She spoke candidly about her experiences at McLean Hospital's Annual Dinner in Boston, Massachusetts.

Selena Gomez attends "The Dead Don't Die" New York Premiere at Museum of Modern Art on June 10, 2019 in New York City
Credit: Theo Wargo/Staff/Getty Images

Selena Gomez has been one of the most famous people in the world ever since her Disney Channel days. But that doesn't mean things have always been easy for the 27-year-old performer.

Throughout her career, she's been open about both her physical and mental health issues. In 2015, she revealed to the world that she had lupus and needed to take time away from the spotlight. A year later, she opened up about enduring a years-long battle with depression and anxiety, for which she has sought treatment multiple times.

Now, in a powerful new speech, the "Back to You" singer got even more candid about her mental health struggles, revealing that it was because of the support of her doctors that she was able to fully understand what she was going through. (Related: Selena Gomez Announces a Break to Deal with "Anxiety, Panic Attacks, and Depression")

Last Friday, Gomez spoke at McLean Hospital's Annual Dinner in Boston, Massachusetts, sharing her experiences before and after treatment.

"I think that we are better when we tell the truth. And so this is my truth," she told the audience. "Last year, I was suffering mentally and emotionally, and I wasn't able to stay all kept up and together. I wasn't able to keep a smile or to keep things looking normal. And it felt like all of my pain and anxiety washed over me all at once, and it was one of the scariest moments of my life." (Related: Selena Gomez Took to Instagram to Remind Fans That Her Life Isn't Perfect)

Gomez then revealed what happened once she sought the support she needed: "The doctors were able to give me a clear diagnosis. The moment I received that information, I actually felt equal parts of terrified and relieved—terrified, obviously, because the veil was lifted, but relieved that I finally had the knowledge of why I had suffered for so many years with depression and anxiety."

Empowered by the clarity she'd gained about her mental state, Gomez then began to face her struggles "head-on," she said. She also credited her mother for teaching her to face her fears rather than run away from them.

"I actually sought out to get the help that I needed," she continued. "I got educated. I talked to a lot of people that were suffering with the same things. I read a lot about it, and it was something that kind of took over and I became very passionate about it."

Gomez also expressed gratitude toward her medical team for working with her all this time, opening up about how she's doing now, thanks to their help.

"I've met with some of the greatest doctors, and I've met with specialists, and I'm just fortunate enough to be able to work with some of the greatest doctors and psychiatrists and amazing people to help guide me personally through my journey," she said. "Although this does not mean that it has all gone away, I can say that after a year of a lot of intense work that I am happier, I am healthier, and I'm in control of my emotions and thoughts more than I've ever been, so I'm very happy about that." (Related: Why Selena Gomez Doesn't Have Instagram On Her Phone)

Check out Gomez's speech below:

Despite facing these extremely personal struggles under such a public microscope, Gomez still puts herself out there and shares her experiences to help others feel a little less alone. Here's hoping that Gomez continues to feel strong, healthy, and supported by her loved ones, medical team, and fans around the world.