A former esteemed Mount Sinai doctor admitted in court Friday that he sexually assaulted four female emergency-room patients — including one he drugged ­before attacking — as part of a deal that lands him two years in prison.

“Compulsions twisted my brain,” Dr. David Newman, 45, said in Manhattan Supreme Court while admitting to dosing a 22-year-old patient with Propofol — the same powerful sedative that killed Michael Jackson — and then ejaculating on her face.

He also admitted to groping three other women in separate ER visits.

The woman he drugged had come to the hospital with shoulder pain. She became unconscious after Newman administered the sedative, but said she awoke during the attack.

“On Jan. 12, 2016, you subjected the complainant to sexual contact when she was incapable of giving consent,” Judge Michael Obus said in taking Newman’s plea. “Do you enter a plea of guilty on that charge?”

Newman responded “Yes.”

As part of the plea deal, Newman, a dad of two, additionally admitted he had groped the same woman during a previous visit. He also copped to groping the three other women in the summer and fall of 2015.

“I administered an unnecessary dose of Propofol [to one victim], causing [her] to be unable to speak or respond, leaving her unconscious and masturbating next to her,” Newman told the judge.

“On three other occasions, I unnecessarily touched the patients during treatment,” Newman added. “These compulsions twisted my brain, and I am so deeply sorry to all of these victims.”

Obus told Newman, “You’ve gotten yourself into a very bad position here.”

Newman, who had faced as much as seven years in prison if convicted at trial, pleaded guilty to five counts of sexual abuse and is set to be sentenced Jan. 23. His victims are expected to give statements at his sentencing.

He remains free on $50,000 cash bail pending the sentencing, and declined to speak to reporters as he left court.

As photographers descended on him, the disgraced doc griped, “C’mon, guys, have a little compassion, you got me upstairs.’’

Newman has been fired, and Mount ­Sinai cooperated with the authorities, hospital officials said.

“We believe that with this guilty plea today, justice is served,” said a hospital spokeswoman.