What if in 1940 Germany somehow managed to
capture the French fleet off the coast of Algeria rather than the UK destroying it?
How would this affect the rest of the war in Europe (particularly the Battle of the Atlantic)?
Do you mean the whole French Navy or just the French ships that were attacked at Mers-el-Kebir?
The French Fleet at the start of World War II had about 80 submarines, an aircraft carrier, 2 incomplete new battleships, 5 old battleships, 2 new battlecruisers, 19 cruisers (7 heavy and 12 light) and 70 destroyers (including 32 contre-torpilleurs and 12 small destroyers of the torpedo boat type) plus minor war vessels.
The French fleet in the link was only 2 battlecruisers, 2 old battleships, 6 destroyers and a seaplane carrier.
As pointed out earlier in the thread the Germans captured a British built destroyer from the Greeks in 1941 and put her into service. What hasn't been pointed out so far is that they captured several Italian destroyers in September 1943 and put some of them into service. They also tried to finish some incomplete French and Dutch cruisers and destroyers, but IIRC the only one they succeeded in commissioning was the destroyer ZH1 (ex-Gerard Callenburgh).
If you only mean the ships that were at Mers-el-Kebir then part of the Armistice agreement with Vichy France could had been that those ships be handed over to the Germans and that Vichy had to maintain them and provide the ammunition. The Kriegsmarine could have provided some of the crews from the surviving members of the 3 cruisers and 10 Z-type destroyers recently lost in Norway and part of the Armistice agreement would have to be that Vichy would provide the necessary training.
However, as already pointed out it would be many months before the ships were operational, with the battleships and battlecruisers taking longer to bring into service than the destroyers.
Furthermore, it has already been pointed out the Italians didn't have enough fuel to keep all of their battleships operational so the 4 surrendered French battleships will spend most of their time as a fleet in being.
On the other hand the 6 destroyers would have been a useful addition to the Axis naval strength in the Mediterranean. Firstly because the Italian destroyer building didn't keep up with losses and second because they were the fast and heavily armed large destroyers of the contre-torpilleur type.
They aren't going to have any influence on the Battle of the Atlantic because they won't get past Gibraltar unless Spain comes into the war and on this board suggesting Spain joins the Axis is nearly as big a sin as mentioning Operation Sealion.
However, if you mean incorporating the whole French Navy into the Kriegsmarine (that is less the ships in British ports, Alexandria and the West Indies) it's already been pointed out that they didn't have the men or the fuel.
I suppose you could have the organization of the Vichy regeime (Or at least the shifting of the alignment/readiness of the French Navy) go somewhat more smoothly/quickly and thus have the fleet be combat-read to defend itself when the British attack. If we consider Petain's government a puppet of Germany, one could say that if they managed to save the fleet and declared war on GB as a result it would be "Germany" getting those ships. Would that qualify?
This is the most feasible way for it to happen. IIRC from the British official history of the war in the Mediterranean and Middle East it was touch and go whether Vichy France would declare war on Great Britain.