LOS ANGELES-Katy Perry's new music was inspired by her own battle with depression.

The 34-year-old singer has recorded a cover of 'Waving Through a Window' from Broadway show 'Dear Evan Hansen' and admitted she was inspired when she saw the musical in April 2017.

Katy was particularly struck by 'Waving Through the Window', which the title character - an anxiety-stricken high school loner - sings early in the production about his loneliness, and the 'Firework' hitmaker has advised fans struggling with similar problems that they are not alone.

She wrote on Instagram: ''On April 29, 2017, I went and saw Dear Evan Hansen on Broadway, and was emotionally transformed forever.

''In my own life, I've struggled with depression, and like so many, always feeling alone in the battle of wanting to belong. ''That night, I was particularly struck by the song 'Waving Through a Window'. It embodied the mental isolation I sometimes fought.'' Katy - who saw the show again in October when it toured Los Angeles - connected with the song so much, she ''jumped'' at the chance to record it for a deluxe soundtrack album.

She concluded: ''When my friends @benjpasek and @justinpaulmusic came to me and asked if I would like to re-record this song, not only to help launch the national tour, but to continue the conversation on mental health and all its complexities, I jumped right in.

''I hope this song helps you know that you are not alone, and that I'm waving back at you.'' The 'Dark Horse' hitmaker recently admitted she thinks the music industry is ''brutal'' and even people who have huge followings on social media can still be lonely. She said: ''If anyone else can tell, the music industry is going through something very strange, and I think young people are really in a struggle with online services and ideas of what they should be and what their life should be about.


''I felt that same way too, and I think a lot of us feel really alone even when we have over 75 million people following us and liking our stuff. This industry [is] kind of brutal. Just stay true to yourself.

''That's all I ever did. I didn't really have very much fear. I don't have any fear anymore. I really don't care what the outside world says about me 'cause I know who I am.''