Jada Pinkett Smith opened up about her past drug and alcohol abuse to cope with her depression and said she struggled with suicidal thoughts when she achieved success early in her career.

In Monday’s episode of "Red Table Talk," Smith addressed mental health and spoke about rapper Mac Miller, who died of an accidental drug overdose in September. The actress said she could relate to Miller’s struggles because she also dealt with issues in the past.

JADA PINKETT SMITH REVEALS SHE WAS SUICIDAL AFTER BECOMING SUCCESSFUL

"When I looked at [Miller's] circumstances I felt for him because I knew that could have been me, easily. I was the same way. In my depression, using ecstasy, drinking a whole lot, you know, and smoking a bunch of weed and trying to just find some peace in my mind," Smith said.

"It's like, I knew [what] I was doing — I was doing ecstasy because I wanted to party," she added. "I was doing ecstasy, weed and a bottle of Courvoisier because I wanted to get lit. I wasn't making the connection, and I knew … I knew I was on the course of addiction. I was very clear about it."

Smith also revealed she had a "complete emotional collapse" when she was around 20 years old that led to suicidal thoughts.

JADA PINKETT SMITH REVEALS STRUGGLE WITH RACIAL BIAS: 'BLONDE HAIR ON WHITE WOMEN JUST TRIGGERS ME'

"I had gotten to LA and gotten a certain amount of success and realized that that wasn't the answer," the "Girls Trip" star said. “It wasn’t what was going to make everything okay. [It] actually made this worse. I was extremely suicidal, I had a complete emotional collapse."

Smith has been open about her past struggles with depression. She said in June there was a period where considered taking her own life.

Smith was joined by her daughter, Willow Smith, and rapper Kid Cudi, who also spoke about his own experience with his mental health, for the episode.