Olympian Gus Kenworthy has revealed that he struggled with depression before publicly coming out gay.

The 29-year-old freestyle skier came out on the cover of ESPN Magazine following his silver medal win at the 2014 Winter Olympics in Sochi, Russia.

Four years later, during the Winter Games in South Korea, Kenworthy made headlines when he kissed his then-boyfriend Matt Wilkas after a run.

(Related: Gus Kenworthy says he would kiss his boyfriend at Beijing 2022 Winter Olympics.)

In an Instagram post, Kenworthy said that he feared coming out would hurt his career, but it had the opposite effect.

“It’s exhausting being in the closet,” Kenworthy wrote. “There was so much time and energy put into harboring that secret that I think it really took a toll on my mental health and I struggled with depression and at moments in my life, thoughts of suicide.”

(Related: Gus Kenworthy says he's participating in AIDS LifeCycle to help educate youth about HIV.)

“I think for a lot of my career and my coming up in the sport, my mental health was kind of put on the back burner, and I feel like I was really compartmentalizing. I was not out of the closet. When I did take that stand and come out it was the best thing I could have ever done for my mental health. I thought it was gonna be, like, a thing that maybe it was a hindrance for my sport, and it was the exact opposite. My following year after coming out was my best season to date. I felt so liberated, I had a huge weight off my shoulders…I think that mental health is so important and I’m so glad that it’s something that is getting talked about more and more frequently now because it’s so important for everybody. It’s especially important for LGBTQ kids who are at a much higher risk of self-harm, just because they do struggle to come to terms with themselves, ourselves, and the rate of suicide is so much higher,” he said.