Meghan Trainor is using music to ''help with [her] mental health''.

The 26-year-old singer says being at home amid the coronavirus pandemic has left her ''trapped in [her] brain'', and in order to keep her mental health in check, she has been turning to ''meditation'' as well as trying to write new music.

She told Brooke Reese for Apple Music: ''Music is really helping me with mental health right now. I know there's a lot of people sitting at home just trapped in their brain and their thoughts, and that can be a very scary place. I'm working on it with meditation every day and writing, just trying to throw up my creativity and do something.''

The 'Make You Dance' singer has been open about her mental health struggles in the past, and was diagnosed with panic disorder after she underwent two operations to fix damage to her vocal cords in 2015 and again in 2017.

Following her second surgery, Meghan worried she would never be able to sing again, and her stress spiralled into a series of recurrent panic attacks, which ultimately saw her admitted to hospital.

Speaking earlier this year, she said: ''I was working really hard, and I kept having to cancel tours [to undergo vocal cord surgeries]. I was like, 'This is all I have, this is my life - if I can't sing, I can't work.'

''It turned into a lot of sleepless nights and a lot of scary panic. I went to the emergency room a couple of times because I thought my throat was closing from an allergic reaction, and the doctor was like, 'This is a panic attack.' ''

Since her diagnosis, the 'Wave' hitmaker has worked hard to kick her anxiety and hasn't had an attack for several years.

She continued: ''My doctors diagnosed me with panic disorder. They were like, 'Your chemicals are way imbalanced - we have to get you back to normal.'

''I met a psychologist who gave me medicine; I had therapists; I worked out; I got acupuncture. Now it's been a couple years, and I haven't had a panic attack in so long I feel like I conquered it. I kicked some a**.''

However, Meghan - who married 'Spy Kids' star Daryl Sabara in 2018 - still works hard to take care of her mind by reminding herself of how special she is.

She added: ''My therapist blew my mind with this. If you go through a really hard patch of anxiety, and you get out of it, you should reward yourself. So my big thing that I'm working on in life right now is treating myself and being good to myself because it's a very hard thing to do -including taking care of my health and even how I talk about myself.

''My husband will catch me being like, 'I'm huge today' or 'I feel so ugly,' and he'll be like, 'Hey, tell yourself you're pretty. You're beautiful - remind yourself.' ''