The 30-year-old also wounded three people, one seriously, with a hunting rifle in the attack, which took place in the early hours of Thursday morning on a quiet street in Arras, not far from the port of Calais.
The man "did not handle his split (from his former partner) well" according to initial police investigations.
Two of those shot dead were in their 50s, according to police. The killer was later found dead in his car by officers close to the local hospital.
Two witnesses were also being cared for by emergency services.