The Newark cop accused of fatally shooting his estranged wife and wounding her boyfriend told investigators that he “blacked out” when he dropped by at his former home and suspected that another man was in her bedroom, according to a report.

Lt. John Formisano, 49, was charged with murder, attempted murder and endangering the welfare of their two children, who were left unharmed in the Jefferson, New Jersey, home during the Sunday night shooting.

The 24-year veteran of the Newark police force is being held in a psychiatric unit at St. Claire’s Behavioral Health in Boonton, NJ.com reported.

He told investigators that he remembered shooting Christine Formisano and the man, whom court records identified only as a 40-year-old with the initials T.S., according to an affidavit of probable cause obtained by NJ Advance Media.

“After entering the residence, Formisano stated that he began to suspect that (Christine Formisano) had a male guest in the bedroom, at which point he ‘blacked out,’ ” according to the affidavit.

“He stated that he recalls firing his weapon numerous times at C.F. and T.S.,” it said.

Formisano and his estranged wife were in the process of divorcing and he had moved out of the home, which he bought almost a decade ago, according to court records cited by the news outlet.

Shortly before the shooting, he called the house to speak with his estranged wife, who later noticed a flashlight beam outside the residence, T.S. told investigators.

Formisano told authorities he went to the house to drop off a pair of eyeglasses for one of their children, according to court documents.

Christine locked herself and her boyfriend up in her bedroom, where T.S. said she yelled, “He’s got a gun!” and, “Call 911!”

Formisano broke down the door and opened fire, hitting T.S. in the thigh, hand, arms and abdomen, NJ.com reported, citing authorities.

The woman managed to flee and tried to gain entry into two nearby homes before she was shot to death on a neighbor’s front porch – with surveillance cameras recording at least part of the attack, police said.

John Formisano was arrested at 2 a.m. Monday in a parking lot in Livingston, about 30 miles away. His handgun was found in the trunk of his vehicle, authorities said.

He was suspended without pay from the Newark Police Department.