The 22-year-old singer admitted as much in an interview with French radio station NRJ on Thursday. Gomez and Bieber were an on-again, off-again couple for years, and the star said her music has helped her cope with their tumultuous relationship.
"I definitely have so much respect and love for him," she shared. "['The Heart Wants What It Wants'] was my way of having it be a message more to people in general. People everywhere feel this feeling. They should understand when anybody goes through that. They just can't help what they want and [who] they love."
Gomez gave an emotional performance of "The Heart Wants What It Wants" at the 2014 American Music Awards. The song is widely believed to be about the singer's relationship with Bieber, and she told the radio station her time in the studio has proved to be therapeutic.
Gomez and Bieber made their debut as a couple at the 2011 Vanity Fair Oscar party, and have broken up and gotten back together several times since. The stars were seeing each other as of September, but the relationship fizzled out after Bieber was spotted with Kendall Jenner in Paris.
Gomez released her debut solo album, Stars Dance, in July 2013. She is currently working on her second studio album, and has continued to pursue a career in acting. She last appeared in William H. Macy film Rudderless, and is scheduled to voice Mavis in Hotel Transylvania 2.