After the passing of Stephen "tWitch" Boss, Tyler Perry is speaking out about his past struggles with mental illness.

At the age of 40, Boss, a professional dancer, actor, former DJ, and co-executive producer for the "Ellen DeGeneres Show," committed suicide.

In a touching Instagram video on Thursday with the caption "Life," Perry paid tribute to Boss.

“I like the rest of the world am shocked by the death of Stephen Boss, tWitch,” Perry said. “I’ve only met him a couple of times. He was always full of life, he seemed like, such a light.” 

“I just want to take you back to a time in my life when I tried to commit suicide, a couple of times, because it was so dark I didn’t think it would get any better," Perry said.

"I had endured so much pain, so much abuse, sexual abuse, it was all so hard to just move through that I thought the only way to make this better was to end my life,” Perry said. 

“Had any of those attempts happened, I would’ve missed the best part of my life,” he continued. 

“I know it may seem like there’s no hope, but please reach out to someone. Call, ask for help if you are dealing with anything, anything that is emotionally taking you to a place where you think you want to end your life,” he said. 

Perry explained how he got through his own pain, saying: “What I realize now, looking back on all those dark times is, sometimes the pain is a buy-in. I know that’s hard to understand. Not all the time — sometimes — the pain is a buy-in."

"That’s the way I had to learn to look at it to get through it. What I mean by that is, all that pain, all that hell, all that struggle, if I had given up, if I had stopped, I wouldn’t have seen the better part of my life. So, I was buying into something, I was paying for something,” he added.