Selena Gomez opened up about her breakup with Justin Bieber, describing it as the "best thing that ever happened" to her.

In the pop star's new documentary entitled "Selena Gomez: My Mind & Me," released on Apple TV+ on Friday, the singer got candid about the end of her relationship with Bieber in 2018.

"It's about more than a lost love," she said of her 2019 hit song, "Lose You To Love Me," widely believed to be about her split with Bieber. "It’s me learning to choose myself, to choose life, but also hoping that people can find grace and peace in that too. The song is about knowing that you completely lost every part of who you are just to rediscover yourself again."

Gomez and Bieber had an on-again, off-again romance that spanned from 2012 to 2018. Shortly after they split for good, Bieber married Hailey Baldwin.  

SELENA GOMEZ SHARES 'MY MIND AND ME' DOCUMENTARY TRAILER: 'I'M GRATEFUL TO BE ALIVE'

"Everything was so public," she said of the split being heavily in the public eye. "I felt haunted by a past relationship that no one wanted to let go of. Then I just moved past it, and I wasn't afraid anymore." 

Selena Gomez and Hailey Bieber smile at event

Hailey Bieber and Selena Gomez attend the Academy Museum of Motion Pictures 2nd Annual Gala, Presented by Rolex (Photography Tyrell Hampton)

Gomez reflected on the end of the relationship, and how ultimately she found light in a dark situation. 

Selena Gomez attends a premiere

Selena Gomez's documentary "My Mind and Me" covers the past six years of the pop star's life. (Richard Shotwell)

"I feel like I had to go through the worst possible heartbreak ever and then just forgetting everything at the drop of the hand, it was really confusing," she continued. "But I just think that needed to happen, and ultimately it was the best thing that ever happened to me."

CLICK HERE TO SIGN UP FOR THE ENTERTAINMENT NEWSLETTER

Recently, the former Disney star opened up about a viral photo with Haley Bieber from October, in which they were photographed hanging out at the Academy Museum of Motion Pictures.

Selena Gomez and Justin Bieber

Justin Bieber and Selena Gomez had an on-off relationship for several years, which finally dissolved in 2018. (Noel Vasquez)

 "Yeah, it’s not a big deal," she told Vulture. "It’s not even a thing."

CLICK HERE TO GET THE FOX NEWS APP