Oscar-winning actor Philip Seymour Hoffman was found dead of an apparent heroin overdose — with a hypodermic needle still stuck in his arm and 70 baggies of the drug inside his Greenwich Village pad Sunday, authorities said. He was 46.

The acclaimed screen and stage star was discovered in his underwear on the bathroom floor of his $9,800-a-month rental after missing a morning appointment to pick up his three young kids from their mother, his estranged girlfriend, Mimi O’Donnell, law-enforcement sources said.

Philip Seymour Hoffman’s New York City apartment building, Pickwick House, where the actor was found dead earlier today.Getty Images

He was declared dead at the scene, a needle in his left forearm. A source said it was clear that the “Capote’’ star had been dead “for hours.”

Hoffman — a versatile and prolific actor famed for his vivid portrayals of troubled souls — had repeatedly struggled with substance abuse. He spent 10 days in rehab last year for abusing prescription pills and heroin after 23 years of sobriety.

Cops found five empty glassine envelopes in a garbage can, two more under the bed and one on a table in the apartment, along with a charred spoon in the kitchen sink, sources said.

“He was shooting up in the bathroom,” a law-enforcement source said.

The drug envelopes were marked “Ace of Spades,” which sources said is a brand of heroin that has not been seen on city streets since around 2008 in Brooklyn.

Police later executed a search warrant and found 70 glassine envelopes of heroin inside a desk. In addition to the “Ace of Spades,” investigators also found packages marked “Ace of Hearts” and one with a playing-card jack stamped on it.

Hoffman’s body was found at about 11:15 a.m. by a screenwriter pal, David Bar Katz, and Isabella “Bella” Wing-Davey, Hoffman’s personal assistant, who performed CPR. They called 911 at 11:36 a.m. Hoffman was pronounced dead at 11:45 a.m.

Reached by phone, Katz confirmed, “Yes, I was the one who found him . . . But, honestly, right now isn’t the time to talk about this . . . I apologize.”

Hoffman in “The Hunger Games”AP

Wing-Davey let Katz into the apartment after getting a call from O’Donnell, with whom Hoffman had lived until moving out three months ago, a law enforcement source said.

“They were apparently estranged. They were living separate lives. He was living over here, she was living over there. You do the math,’’ the source said.

Wing-Davey, according to her LinedIn page, has written and produced a number of short indy flicks, including “Candlesticks,” whose credits list Hoffman as an associate producer.

She is the daughter of Mark Wing-Davey, chairman of the graduate acting department at NYU’s Tisch School of the Arts and a longtime friend of the troubled actor.

Share this:

The law enforcement source said he doubted Hoffman and Wing-Davey were romantically involved.

“He was apparently in the throes of a major heroin addition. Sex is the last thing on your mind. Your sex is your drugs,’’ the source said.

Cops interviewed both O’Donnell and Wing-Davey but did not delve into their personal lives, the source said.

Detectives limited their line of inquiry to questions about Hoffman, such as when the women had last seen him and whether he usually kept his apartment the way they found it, the source added.

Wing-Davey could not be reached for comment.

There was no note, and Hoffman’s death is believed to have been be accidental.

Hoffman in “Doubt”Everett Collection

Probers believe the last person that Hoffman talked to was O’Donnell, during a phone call at 10 p.m. Saturday. She said he sounded as if he were high.

“We’re just really devastated that this could happen,” said Doris Barr, 76, whose son is married to Hoffman’s sister.

“There had always been a concern with the business he was in. We just worried there was a great opportunity for [drug] issues to come up.”

The building where Hoffman lived, at 35 Bethune St., is less than three blocks from a three-bedroom, 2¹/₂-bath apartment on Jane Street that he and O’Donnell, a costume designer, bought for $4.4 million in 2008.

The couple met in 1999 while working on the play “In Arabia We’d All Be Kings,” which Hoffman directed.

They have a son, Cooper, 10, and two daughters, Tallulah, 7, and Willa, 5.

O’Donnell, weeping and distraught, went to the Bethune Street apartment after Hoffman’s body was discovered, but cops wouldn’t let her into the bathroom, sources said.

A Jane Street neighbor described Hoffman as “a troubled soul,” adding that “everyone knew he had substance-abuse problems.”

“He did not look well recently — like he was out of it,” the woman said.

Another neighbor, Amy Gruenhut, 33, said she last saw Hoffman about two weeks ago.

“I would see him strolling around looking depressed.

“He looked sad. He didn’t look normal. There was something off. He just looked really sad and lonely.”

A native of upstate Fairport, Hoffman was a trained stage actor who scored his breakthrough movie role in 1997’s “Boogie Nights,” in which he played a gay member of a porn film crew.

He won the Academy Award for Best Actor for his portrayal of Truman Capote in the 2005 movie “Capote,” shortly after publicly admitting that he had nearly succumbed to substance abuse years earlier, after graduating from NYU’s drama school.

“It was all that [drugs and alcohol], yeah. It was anything I could get my hands on . . . I liked it all,” he told “60 Minutes” at the time.

But he said he got sober in rehab.

Then last year, he admitted to suffering a drug relapse in 2012, and again went to rehab.

Also in 2012, he was nominated for a Tony Award for his portrayal of Willy Loman in a revival of “Death of a Salesman,” one of three times he was up for Broadway’s highest honor.

He also had been nominated for Oscars for his appearances in “Doubt,” “Charlie Wilson’s War” and “The Master,” in which he played a character inspired by L. Ron Hubbard, the founder of Scientology.

In a statement released by his manager, Hoffman’s family called his death “a tragic and sudden loss.”

“We are devastated by the loss of our beloved Phil and appreciate the outpouring of love and support we have received from everyone,” the statement said.