After way too long in the musical desert, Kesha is all the way back. The singer released the dramatic, eye-catching video for the song "Praying" early Thursday morning (July 6), along with the news her fans have literally been waiting years for: a new album, Rainbow, is due out on Aug. 11.

"Am I dead? Or is this one of those dreams? Those horrible dreams that seem like they last forever? If I am alive, why? Why? If there is a God or whatever, something, somewhere, why have I been abandoned by everyone and everything I've ever known? I've ever loved?," the 30-year-old singer asks in the intro voiceover to the video directed by famed music video auteur Jonas Akerlund. "Stranded. What is the lesson? What is the point? God, give me a sign, or I have to give up. I can't do this anymore. Please just let me die. Being alive hurts too much."

The clip for the gospel-like ballad opens with Kesha laying on a raft in the middle of an ocean, seemingly dead, only to cut to the singer in a series of colorful outfits playing the piano while wearing angel wings and a ring that says "loved." In a poignant couplet about her struggles and challenges, she sings, "I'm proud of who I am/ No more monsters I can breathe again/ And you said that I was done/ But you were wrong and now the best is yet to come/ Cuz I can make it on my own/ I don't need you, I found strength I've never known."

The song was co-written by Kesha, Ryan Lewis (of Macklemore & Ryan Lewis fame), Ben Abraham and Andrew Joslyn; Lewis produced the track.

The 30-year-old pop star has been involved in an ugly legal battle with Dr. Luke since October 2014, when she filed a suit against her producer, alleging sexual assault and battery; Luke has denied the allegations. Kesha hoped to dissolve her contract with Dr. Luke as a result of the suit, and early this year, the singer claimedthat the partnership has prevented her from releasing new music.

A defamation suit filed by Luke (born Lukasz Gottwald) in a Tennessee court against Kesha's mother Pebe was dismissed in June with Pebe Sebert acknowledging that she has "no firsthand personal knowledge of the events occurring on the night of the alleged rape." The Tennessee case has been dismissed, though the legal battle between Kesha and Dr. Luke in New York will continue.

For her first album in nearly five years, Kesha worked with a wide variety of collaborators. "Rainbow marks a new beginning for Kesha, one based around inner strength and musical exploration" reads a statement announcing the project. The title track was produced by Ben Folds along with Kesha, Ricky Reed (Phantogram, Meghan Trainor) produced and helped write a number of tracks and Wrabel (Adam Lambert, Afrojack) co-wrote a collaboration that features the Dap-Kings horn section. The Eagles of Death Metal are featured on two tracks, while country icon Dolly Parton guests on a version of her 1980 country hit "Old Flames Can't Hold a Candle to You." The track was co-written by Kesha's mother Pebe Sebert, who also has other songwriting credits the album.

The singer also posted an essay about her long fight back on the Lenny blog on Thursday morning. "'Praying,' my first single in almost four years, comes out today. I have channeled my feelings of severe hopelessness and depression, I've overcome obstacles, and I have found strength in myself even when it felt out of reach," she writes. "I've found what I had thought was an unobtainable place of peace. This song is about coming to feel empathy for someone else even if they hurt you or scare you. It's a song about learning to be proud of the person you are even during low moments when you feel alone. It's also about hoping everyone, even someone who hurt you, can heal."