Millions of viewers were mesmerized by Selena Gomez's incredibly emotional performance of "The Heart Wants What It Wants" - the song inspired by her ex-boyfriend Justin Bieber - at the American Music Awards on Nov. 23.

Long before that electric performance, Gomez broke down crying in her music video for the hit song. And now, in a five minute behind-the-scenes video diary, the singer-songwriter documents the moments leading up to her memorable performance at the American Music Awards on Nov. 23, according to ET Online.

The 22-year-old shows the rehearsals and how she broke down before hitting the stage to sing "The Heart Wants What It Wants."

"This performance is a little bit frightening," she tells the camera. "When I had the intention behind the performance, I knew that I wanted it to be all of me, because somebody asked me a while ago, 'What's the one thing you wish people knew about you?' And I said I wanted it to be my heart."

When she arrives to the red carpet, she explains in the video, "Everybody is there and all glamorous, so fun but then, I gotta be all emotional. Feels like a lump in my throat."

The heartbreaking performance brought Gomez on the brink of tears, and her best friend Taylor Swift also appeared to be crying in the audience. As Gomez delivered the final note of "The Heart Wants What It Wants," Swift can be seen saying, "Thank you, Jesus."

Check out Gomez's American Music Awards performance here:

In the video, after her AMA performance, Gomez's team congratulates her on her heart-tugging performance.

Even though Gomez and Bieber have not been publicly photographed together since their famous ATV ride in September, it is clear that Gomez has nothing but love for her former boyfriend.

"I definitely have so much respect and love for him, and going into the studio is just so very therapeutic," she recently told Norweigan radio station NJR.