Singles victories for Benoit Paire and Lucas Pouille put France on the brink and Benneteau and Mahut, both 36, did not drop a set in overcoming Feliciano Lopez and Marcel Granollers 6-0 6-4 7-6 (9-7).
Croatia also had a 2-0 lead after the first day of its semi-final with the United States but Mike Bryan and Ryan Harrison secured a 7-5 7-6 (8-6) 1-6 6-7 (5-7) 7-6 (7-5) success to keep alive the Americans' hopes of meeting the France.
That contest lasted four hours and 43 minutes in Zadar, where Croatia will still fancies its chances of winning the tie having won both of its singles matches without dropping a set.
Veteran France duo Benneteau and Mahut had been paired against Granollers and Lopez in a match between four men with a combined age of 140 in Lille.
It was an astonishing start from the hosts as the Spaniards won just four points in an opening set that lasted only 18 minutes.
A miserable day continued for the Spanish pair as Lopez suffered a blow beneath his eye during the second set and though it led the third 4-1, France would win the tie-break to seal an emphatic success.
Speaking after the match, Benneteau, who came out of retirement to play this doubles match, offered no assurances over his availability for the final later this year.
"It's quite possible it could be the last match of my career on tour," he said. "And what a way to finish."
The US, the tournament's most successful nation, could still meet France in what would be its first final since 2007.
Bryan and Harrison were one set from victory but the Croatian pair of Ivan Dodig and Mate Pavic fought back to force a decider which the American duo won after a tie-break.
Bryan, who had come out of Davis Cup retirement at the age of 40 to play this game, said: "Seven-six in the fifth, on the road and on dirt, this is right up there [with his best wins] and I will never forget this one."