The 27-year-old, who is best known for playing Desperate Housewives' Andrew Van De Kamp -- the openly gay and occasionally meddlesome son of conservative housewife Bree Van De Kamp (Marcia Cross) -- revealed "against the advice of others" that he was "an alcoholic and a drug addict" who recently celebrated five months of sobriety.

"I'm relatively new to being sober, considering the scope of time that I've been an addict. But within that scope, this is also the longest I've been sober; since I began using," he wrote. "I chose to share this about myself because I could not hear of another person being robbed of their life, due to addiction; knowing that I stayed quiet about mine."

"I made a promise to myself that I would never stand as a preacher of sobriety -- speaking from a podium that could be interpreted as arrogant or judgmental," Pyfrom continued. "I have no judgement for the way anyone chooses to live their life. And I only have compassion for those who currently struggle with their addictions."

DESPERATE HOUSEWIVES - "Any Moment" - Julie becomes concerned over Susan's parenting skills when she begins to allow MJ to do whatever he feels like doing; with Carlos resigning from his high paying job, Gaby tries to land her own high-powered position in order to keep up her extravagant lifestyle; Bree is suspicious of Andrew's intentions when he announces that he's getting married; Lynette puts a plan into action in the hopes of winning Tom back; and Ben finally proposes to Renee, on "Desperate Housewives" Credit: Danny Feld/ABC/Getty Images

Since Desperate Housewives ended in 2012, the young star has appeared as a guest star on TNT's Rizzoli & Isles and as Private John W. Nichols in the TV movie Killing Lincoln. In the tumblr post, he reveals that his substance abuse limited his professional opportunities.

"For several years, I lived for drugs," he continued. "I thought more about using, than I thought about any other 'pleasures.' I wasted the time of valuable people, who worked so hard to pull my career to a higher place, by allowing my addictions to tug me out of their grip."

And while Hoffman's death inspired his post, Pyfrom makes sure to note that the Oscar winner's loss is no more significant than that of any other human being.

"When news reaches us of a public figure, like Mr. Hoffman, passing away form such a terrible affliction; we tend to get the feeling of great loss," he noted. "It is a great loss. I feel grief when I hear of such a talented human being leaving this earth…but every life is important."

Hoffman was found dead in the bathroom of his New York City apartment on Sunday, Feb. 2 after suffering from an apparent drug overdose at the age of 46. He is survived by his girlfriend Mimi O'Donnell and three young children.

Fans and celebrities alike have commended Pyfrom's decision to open up about his own addiction. Pretty Little Liars star Lucy Hale tweeted, "@shawn_pyfrom you are brave & strong. I admire your honesty, my friend," and former Revenge actress Ashley Madekwe retweeted the blog post with the comment, "Brave boy."