In her new documentary My Mind & Me, Selena Gomez described her break-up from fellow musician Justin Bieber as the “best thing that ever happened to me.”

Per ET Online, Gomez opens up about the end of her relationship with the Canadian popstar in the Apple TV+ doc, which debuted on the streamer on Friday. While she didn’t directly mention Bieber by name, she was discussing her track “Lose You to Love Me,” which arrived around a year after her split from him.

"I text [songwriters] Julia Michaels and Justin Tranter and said, 'I think I'm ready to just say I'm sad,'" she said. "We wrote the song in 45 minutes. The fastest song I've ever written. It's about more than a lost love. 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 dated Bieber on and off between 2012 to 2018, and he married Hailey Baldwin not long after they wrapped up their relationship for the final time. "Everything was so public. 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," she said. "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. But I just think that needed to happen and ultimately it was the best thing that ever happened to me."

While the two had a very public break-up, and things didn’t appear to end on the best of terms, it all seems to be good between them now. In fact, Gomez was recently spotted posing with Bieber’s wife at the second annual Academy Museum Gala in Los Angeles. “Yeah it’s not a big deal,” she noted of the pictures. “It’s not even a thing.”

In an interview on the podcast Call her Daddy, Hailey noted that she was on good terms with Gomez, too.