Shawn Pyfrom, who played Andrew Van de Kamp, the on-screen son of Marcia Cross on “Desperate Housewives,” revealed in an open letter on Sunday that he was “an alcoholic and a drug addict.”

Pyfrom posted the open letter on his Tumblr account after he learned about acclaimed actor Philip Seymour Hoffman’s death, due to an apparent drug overdose.

“I want to express that 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. Knowing that if, by sharing my story, I could potentially save a life,” Pyfrom wrote in his open letter.

Pyfrom who wrote that he had been sober for five months, added: “Anytime a person uses drugs, they are taking the chance that their life will be taken from them. Whether they steal your breath, or rob one last beat from your heart - that is left to fate. But they will steal your life from you. Whether you are the occasional user, or someone that uses every day. Every moment spent using drugs (alcohol included) is a moment stolen from your life.”

Despite his success on the ABC drama, Pyfrom said he could not concentrate on his work and give it his full attention, adding that overusing led him to make “poor decisions” and wasted his time and that of others who were trying to “pull my career to a higher place.”

"Some people could argue that drugs have provided some of the most memorable, creative artists this planet has ever experienced. Jimi Hendrix, Kurt Cobain…The list goes on. But drugs also took their lives away," he wrote.

Pyfrom went on: “I am an addict. and I’ve never been more proud, saying it. Because when I think about where I’ve been, and where I am now… I am proud of the man who has addressed and admitted to himself, what was once a clouded denial.”

He summed up the letter by telling readers that he hoped his confession would encourage those who intended to do better their lives.

Pyfrom later wrote on his Instagram: “Thank you to everyone who sent their love and support today, after I posted my open letter. I am overwhelmed with joy and gratitude. But I didn't write this letter just for me. I wanted for anyone out there, who may be struggling like I was, to know that there is strength in admitting your weaknesses.”