The fishing boat was carrying 43 people from the nearby independent nation of the Comoros, the overseas ministry said in a statement.
“The provisional toll is 19 people survived, 15 were missing and five bodies were found, including those of three children,” it said.
One of the children was a baby.
Mayotte is part of the Indian Ocean archipelago of the Comoros but while the three other islands chose independence from France in 1975, it opted to remain under French rule.
The statement said the accident occurred late Saturday afternoon, and that some survivors were rescued by a hotel dive club on Mayotte, whose people are some 10 times wealthier than Comoran islanders.
Olivier Konieczny, a diving instructor, told AFP they had left at 9am and when they reached the middle of the lagoon twenty-five minutes later they saw people floating in the water.
“We rescued 18 people,” he said. “They were in an advanced state of hypothermia, dehydrated, inuries, broken legs.”
Among those rescued by the divers was a girl who said the boat ran into trouble around 5pm on Saturday when it tried to make it through a passage but ran onto the coral reefs that surround Mayotte.
“The boat flipped over several times, the motor, fuel and many passengers were thrown overboard,” she said.
The survivors spent the night in the cold water holding onto the half-submerged boat.
The overseas ministry has activated a maritime safety plan, and “the necessary aerial and nautical means are in place and will remain for as long as needed,” the statement said.
A helicopter and a coast guard boat were searching for the other survivors, it said.
Hoping to find work or medical care, many Comorans, mostly from the poorest island of Anjouan some 100 kilometres (60 miles) from Mayotte, board rickety fishing boats to attempt the risky voyage, often foundering on coral reefs.
Some two-fifths of Mayotte’s 200,000 inhabitants are thought to be illegal immigrants.