Tyler Perry tried to take his own life "a couple of times".

The 52-year-old actor-and-director reflected on the "dark" times he's been through in the wake of Stephen 'tWitch' Boss' suicide earlier this week, and explained he was keen to share a message to reach out to "any of you who are going through hard times, struggling" as he spoke of how he felt he had few options left to cope with the "pain" he was experiencing.

In a video shared to Instagram, which was captioned "Life", he said: "I like the rest of the world am shocked by the death of Stephen Boss, tWitch... I've only met him a couple of times. He was always full of life, it seemed like, such a light.

"With that said, 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. 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.

"Had any of those attempts happened, I would've missed the best part of my life."

The 'Madea' star then urged people who are "going through some things" to contact someone for help.

He said: "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 that is emotionally taking you to a place where you think you want to end your life."

Tyler was eventually able to "rationalise" his struggle by understanding "pain is a buy-in" and he had to get through it to reach a better point.

He said: "What I realise 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. I was buying into something, I was paying for something.

"I know that doesn't make sense to a lot of people but for me, it was the way I was able to rationalise it, to be able to move through the pain, knowing that if I could just get through this moment, there's got to be something better."

The 'Nobody's Fool' director is now "the happiest" he has ever been, with a life "full of joy and love".

He added: "I'm saying that to you, if you are a person who's considering suicide, ending your life, you've already been through a lot of hell, please, please, please, think about what the other side could be. It could be amazing. And you would miss the best part of it going through the darkness. Don't let the darkness stop you from getting to this incredible place of life."

He then shared the number for the National Suicide Prevention Lifeline and again encouraged those who need help to seek it.

He concluded: "My hope is that if you need help, that you reach out. Call this number. God bless you. I'm with you.

"I'm a living witness you can make it through it. I'm so glad my attempts didn't work. I'm still alive. The best part of my life, and I would've missed it had I decided to end it. Well I did, but, it didn't work.

"Let's end this new year loving us, loving on each other, encouraging ourselves, this is gonna take that from within. God bless you. Rest in peace, tWitch."