A cop who received the NYPD’s Combat Cross — and celebrated by getting drunk and allegedly barging into a woman’s home — told his victim “Sometimes I’m a good guy, but sometimes I’m a bad guy,” as he attacked her in his underwear, court papers show.

Officer Eugene Donnelly, 27, was charged Monday with burglary and assault for allegedly busting down the door of the frightened woman’s apartment in the Woodlawn section of The Bronx at 5:30 a.m. June 11, and punching her repeatedly as she lay in her bed, sources said.

A day before the incident, the officer had donned his dress blues and white gloves to shake Police Commissioner Bill Bratton’s hand and receive his award — the department’s second-highest honor — from Mayor de Blasio.

After the ceremony, the cop went out to celebrate and became blind drunk, passing out at a friend’s house, sources said.

He awoke and wandered outside in his underwear and busted down the door, breaking the chain lock to the 30-year-old neighbor’s apartment in a bizarre and seemingly random rampage, a Criminal Court complaint charges.

“Shhh, It’s OK. Just put a shirt on,” the cop allegedly said when the startled tenant awoke.

He then walked into the kitchen and drank some milk before charging out into the foyer, where he grabbed the victim, threw her to the floor and began hitting her in the face, prosecutors said.

The woman told investigators the cop then dragged her by her armpits back into her bedroom, where he continued punching her in the face and head, causing her head to slam to the floor several times.

The woman reported the attack to police, who circulated a “Wanted” poster with Donnelly’s image from the building’s surveillance cameras before realizing the suspect was one of their own, sources said.

Once his brothers in blue recognized him, Donnelly was immediately stripped of his gun and badge and put on modified duty.

The investigation wrapped up Monday morning, and he was arraigned on charges of burglary, assault, criminal trespass and harassment.

Donnelly was released on his own recognizance Monday. A person answering his home phone hung up.