Following the death of Stephen “tWitch” Boss, Tyler Perry is speaking out about his own mental health past.

Boss, a professional dancer, actor, and former “Ellen DeGeneres Show” DJ and co-executive producer, committed suicide on Tuesday at the age of 40.

Perry paid tribute to Boss in a poignant Instagram video captioned “Life.”

“I, like the rest of the world, am shocked by Stephen Boss’s death, tWitch,” Perry stated. “I’ve only met him a few times. He was constantly full of life, and he appeared to be such a light.”

The director opened up about his issues.

“I want to take you back to a moment when I attempted suicide a couple of times because things were so bad that I didn’t think they’d get any better. I’d been through so much anguish, abuse, sexual assault, and it was all so difficult to get through that I thought the only way to make it better was to end my life,” Perry explained.

“If any of those attempts had succeeded, I would have missed the best part of my life,” he said.

Perry encouraged individuals in need to seek assistance.

“I realize there may be no hope, but please contact someone. Call and seek for help if you are suffering with anything, anything that is emotionally causing you to think you want to end your life,” he stated.

“What I see now, reflecting on all those awful days, is that sometimes the suffering is a buy-in,” Perry said of his pain. “I realize that’s difficult to grasp.”

“Not often, but occasionally, the pain is a motivator. That’s how I learned to look at it to get through it. That is, if I had given up, if I had stopped, I would not have seen the best half of my life, despite all of the agony, suffering, and effort. So I was investing in something and paying for something.”

“I know it doesn’t make sense to a lot of people,” he continued, “but for me, that was the way I was able to rationalize it, to be able to move through the pain, knowing that if I could just get through this moment, there has to be something better.”

Perry described himself as “the happiest I’ve ever been.”

“I’m telling you because if you’re thinking about suicide, ending your life, and you’ve already been through a lot of pain, please, please, please consider what the other side could be,” he continued.

“It might be incredible. And you’d miss the best part if you went through the darkness. Don’t let the darkness keep you from reaching this great point in your life.”

Perry gave information about the National Suicide Prevention Lifeline’s resources.

“My aim is that if you need assistance, you will seek it. Please dial this number. God’s blessings on you. I’m on your side,” Perry responded. “I’m living proof that you can get through it.”