Meghan Trainor suffered her first panic attack during a live television appearance.

The All About That Bass hitmaker has previously opened up about her struggles with anxiety, and in a new interview with People magazine, she recalled the moment she really knew it was time to seek professional help.

Recounting how she was on camera alongside Gayle King to announce the 2017 Grammy nominees on CBS This Morning in December 2016, Meghan suddenly felt like she was going to faint.

"I was announcing the nominees, and I was vibrating. I felt like I was going to pass out on live television. I was like, 'What's happening? I must be dying,'" she remembered. "As soon as they said 'Cut,' I went offstage and was (gasping for air) in front of everyone."

Meghan went on to note that she fell into a "dark place" following the panic attack, and it wasn't until she made an appointment with a psychiatrist that she began to turn a corner.

She still takes medication to treat her symptoms, and did so while pregnant with her son Riley, who was born in February.

"I'm not ashamed to say I'm on antidepressants," the 27-year-old continued. "That medicine saved me, saved my life, saved my career. I'm back better than ever."