Former California Rep. Katie Hill contemplated suicide after naked photos of her were leaked online, she revealed Saturday.

Hill, who resigned from Congress in October amid a “throuple” scandal and an ethics probe into an alleged relationship with a subordinate, wrote in a New York Times op-ed that she nearly sliced her wrists with a paring knife while sitting in a cold bath.

“I just wanted it all to be over,” she wrote. “I felt like I was out of my body, like it was moving without me, and I got the paring knife and got back into the cold bath.”

“I stared at the veins in my wrists. They were so thin. They were green in the candlelight,” Hill continued. “I started tracing them with the edge of the knife, lightly at first, then pushing harder and harder,” she wrote.

The ex-congresswoman said thoughts of her family — along with anyone inspired by her story — stopped her from going through with it.

Hill also revealed that her decision to resign from Congress had been hers alone — and not prompted by House Speaker Nancy Pelosi.

“[Pelosi] told me I didn’t have to do this, that the country needed me and that she wished I hadn’t made this decision, but she respected me and what I felt I needed to do,” Hill wrote.

Hill admitted to being in a “throuple” relationship with her estranged husband and a former female campaign worker. But she denied having a relationship with her former legislative director, Graham Kelly.