The news comes with France already grappling with the surge in police suicides this year.
The Paris officer, Arnaud Martin, finished his shift on Saturday evening and went to meet his girlfriend in Sarcelles, a suburb north of the capital city, to discuss ending their relationship.
But after an argument broke out, Martin shot the young woman in the face and killed two men who were nearby, aged 30 and 44, one of whom had tried to intervene, said Eric Corbaux, prosecutor for the Pontoise department, said.
He then went to his girlfriend's home just a few yards away, where he killed the girl's father and seriously injured her mother in the throat.
He also shot the woman's sister in the leg and killed the family dog.
The attacker was later found "dead from a gunshot wound to the head, his gun in his hand, in the back of the garden," Corbaux said.
"According to his superiors, he was a good civil servant, a very serious former gendarme," Corbaux said.
Saturday's tragedy comes as French officials confront a sharp increase in police suicides, with more than 45 officers and 16 gendarmes killing themselves so far this year.
But Interior Minister Gerard Collomb said Sunday that he would not backtrack on allowing officers carry their weapons when off-duty, a practice France introduced after the November 2015 terror attacks in Paris.
"It's something that requires a lot of attention by police supervisors," Collomb said on France Inter radio, though he acknowledged that most police suicides are prompted by events in their private lives.
(This story has not been edited by NDTV staff and is auto-generated from a syndicated feed.)