Nowitzki finished with 18 points after starting 1 of 11 from the field, salvaging his 10th straight double-figure game after scoring in single digits the first four games once he returned from missing 27 games due to right knee surgery.
The Mavericks had six players in double figures for the fourth straight game. Mayo had 18 points and seven assists, and Darren Collison scored 15.
Elton Brand had 10 points and 13 rebounds for Dallas, while Serge Ibaka had 11 points and 14 boards for the Thunder.
Durant, who has scored at least 40 three times in the past week, put Oklahoma City ahead 99-98 on a pair of free throws after he was fouled on a drive with 1:32 left in regulation. He hit two more after he was fouled following a rebound of a miss by Nowitzki, and Oklahoma City kept the lead until Mayo's 3-pointer with two defenders in his face forced overtime at 105-all.
"There are some things that we obviously could have done to limit him," Carlisle said of Durant. "He had a great game, and he is the best shooter on the planet."
Neither team led by more than three in the final 6 minutes of regulation and overtime.
The Mavericks, who earlier this season tied an NBA record with their 10th straight overtime loss, fell to 1-8 in overtime games this season. Two of the losses have been to the Thunder, who improved to 4-0 in overtime.
"It was one of those games no one deserved to lose," Oklahoma City coach Scott Brooks said. "I'm glad we came out with the victory because that's not an easy win."
The Mavericks trailed 87-79 when Carter hit a free throw and Nowitzki had a tip-in to start a 13-2 run that gave Dallas its first lead since the first quarter. Nowitzki's free throws put the Mavericks up 90-89 with 6:41 left.
NOTES: Nowitzki was called for a technical foul during a timeout, and Thunder C Kendrick Perkins picked up one when he got in Chris Kaman's face after Perkins was called for a foul for bumping Kaman while they were battling for a rebound. ... Brand recorded the 400th double-double of his career Wednesday against Houston. He had 11 points and 10 rebounds. ... Durant will start in the All-Star game Feb. 17 in Houston. His coach, Brooks, won't be in charge. Brooks is ineligible to lead the Western Conference stars because he did it last year. "It was pretty cool to be able to meet some of the players and see how they are off the court," Brooks said. "Whoever gets it will have a great experience in a great city."