Tortured actor Philip Seymour Hoffman was trapped in a love triangle before he died, according to his private diaries.

The Oscar winner was “caught in between” his relationship with longtime girlfriend Mimi O’Donnell and a woman with whom he he’d recently hooked up, according to his journals, law-enforcement sources told The Post on Tuesday.

Hoffman implied that his new gal pal was one reason O’Donnell — the mother of his three young children — might have bounced him from their Jane Street pad about three months ago, sources said.

O’Donnell also didn’t want the drug-addled Hoffman living with her and their kids while he was still using, sources have said. She hoped the tough love would make him get clean faster.

The 46-year-old “Capote’’ star — who died of an apparent heroin overdose Feb. 2 — also painfully wrote about the addiction that would eventually kill him, the sources said.

He felt “ashamed that he was going out and hanging out and drinking” after having been sober for so long, sources said.

The portly actor had first gone through rehab right out of college, and then remained clean for about 23 years before his tragic relapse.

Hoffman wrote that he was haunted by “demons” and was desperately trying to control his addictions by attending Narcotics Anonymous meetings, NBC reported.

He also wrote about scoring his drugs, with some of the entries appearing to have been penned while he was in rehab, the network said.

The two scribbled diaries are hard to read, multiple sources said, with some passages starting out clearly enough but then degenerating into an illegible scrawl, suggesting that Hoffman wrote them while he was wasted.

“It’s stream of consciousness and difficult to follow,” one source told NBC.

“In one line, he refers to ‘Frank who always owes money,’ and on the same page, he writes about a 15-year-old girl from Texas.”

Another source added, “It seems he did at least part of it in rehab. It definitely contained some soul-searching. But there is also a fair amount of rambling that doesn’t make sense.”

Hoffman was found dead in his West Village pad with a needle still stuck in his arm. His place was littered with empty heroin envelopes and syringes. More than 40 full bags of the drug also were also recovered.

Cops discovered the pair of small diaries — one about 6-by-8 inches and another about 7-by-9 inches — while searching the place.