A man who was trying to bust into his ex-girlfriend’s apartment in Staten Island died while in police custody yesterday, authorities said.

The ex-lover had an order of protection against the Irving Mizell, 52, and called cops when he showed up at her home on Richmond Terrace near Westervelt Avenue around 6:35 p.m. and started banging on her door, police said.

The 53-year-old woman phoned police, who showed up and arrested Mizell for violating the restraining order, police said.

While at the 120 precinct police station, Mizell started complaining that he was having trouble breathing, police said.

He was taken by ambulance to Richmond University Medical Center, where he was pronounced dead, police said.

The city’s medical examiner will determine the cause of death, police said.