"I am extremely thankful that I did not take my life."

Photo: Clive Rose / Getty Images

He might be the most decorated Olympian of all time, but that doesn't make Michael Phelps immune to mental health struggles.

The swimmer, who has won 28 Olympic medals (23 of them gold), recently spoke at a Kennedy Forum about battling depression, anxiety, and suicidal thoughts at the height of his Olympic career. (Related: 9 Celebrities Who Are Vocal About Their Mental Health Issues)

It started when he was 15 and had just broken his first world record-and went on to win his first gold at the 2004 Olympic games. "I was always hungry, hungry, and I wanted more," Phelps said, according to CNN. "I wanted to push myself really to see what my max was." (Read: Stress Can Take a Toll on Your Long-Term Mental Health)

In the following years, Phelps was charged with his first DUI, was caught smoking out of a bong, and fell deeper and deeper into a dark place. His wake-up call didn't come until after the 2012 Olympics when he was at an all-time low. "I didn't want to be in the sport anymore ... I didn't want to be alive anymore," he said.

After spending several days locked in his room, Phelps said he finally found the strength to admit he had a problem and needed help. "I got to a point in my life where I was ready to seek help," he said. "People look at celebrities like they're something special, but I've had the same struggles as everybody else."

Over the next few years, he sought out treatment and at one point, admitted himself into a facility. Now, he hopes to use his personal experience to encourage others to get the help they need. "It's okay to not be okay," he said, adding that mental illness "has a stigma around it and that's something we still deal with every day."

"That's the reason why suicide rates are going up-people are afraid to talk and open up," he said.

Today, by impacting others through his foundation and his work with the Boys and Girls Club, Phelps feels a sense of gratification he never has before. "Those moments and those feelings and those emotions for me are light years better than winning the Olympic gold medal," he said. "I am extremely thankful that I did not take my life."

If you or someone you know needs help, please call 1-800-273-8255 for the National Suicide Prevention Lifeline.