Kelly Clarkson also revealed that she wrote her own song about the divorce that will be featured on her next album

Kelly Clarkson is turning to music to help her get through her divorce from estranged husband Brandon Blackstock.

On Friday, the 38-year-old artist sat down with Garth Brooks for an episode of The Kelly Clarkson Show, and revealed that the country star's song "The Dance" helped her process the split.

"So I'm going through a divorce and there's been like a lot of books and people always give you stuff to help, especially when you have kids and stuff," Clarkson said. "And there's so much shame and guilt, and everybody sends you stuff, and I was just kind of working through it."

"I couldn't quite nail down the feeling," she continued. "Like you don't want to crap on it, like, you don't want to say that [relationship] doesn't count or matter, but you don't know what to put in it because it didn't work out like you wanted. So, anyway, I kid you not, I was listening to my playlist and 'The Dance' came on. And I was like, 'No, that's the thing. That's it.'"

Clarkson said she was so moved by his song that she went ahead and wrote her own, which she said will be featured on her next album.

Kelly Clarkson, Garth Brooks
Kelly Clarkson, Garth Brooks
| Credit: Trae Patton/NBCU Photo Bank/NBCUniversal via Getty; Taylor Hill/FilmMagic

"So, I literally, not like your song, like a rip-off, but I literally wrote this whole thing therapeutically for me, and it's actually on my next album," she said. "The whole come-around, the little tag part is like, 'Even though my heart is broken / It was worth the dance anyway.'"

"I think a lot of people that go through such a devastating [thing], there's a lot of grief and a lot of loss and change, especially when you have kids," Clarkson continued. "All of the books were helpful, but it's so funny, I guess because I'm a musician, but I was listening to 'The Dance'... [and] I got the point."

Never miss a story — sign up for PEOPLE's free daily newsletter to stay up-to-date on the best of what PEOPLE has to offer, from juicy celebrity news to compelling human interest stories.

Clarkson filed for divorce in June after being married to Blackstock for seven years. (They got engaged in December 2012 and were married in October 2013.)

In late October, the "Stronger" singer was awarded primary custody of their children, daughter River Rose, 6, and son Remington Alexander, 4, by a Los Angeles County judge. Clarkson and Blackstock are currently in the midst of their divorce proceedings.

Kelly Clarkson BTS style
Kelly Clarkson
| Credit: Trae Patton/NBC

"The Court finds that under the circumstances present in this case, the interest in providing stability and continuity for the minor children weighs in favor of Petitioner having primary custody," the court document obtained by PEOPLE read, referring to Clarkson.

The document added that "the level of conflict between the parents has increased. The parties have a difficult time co-parenting due to issues of trust between them."

Clarkson will allow Blackstock — who plans to reside in Montana and works as a music manager — to visit the former couple's children in the L.A. area at Clarkson's Woodvale residence.

The former couple will share joint physical and legal custody, but Clarkson will have primary physical custody in Los Angeles. Blackstock will FaceTime with River and Remy every day "at a mutually agreed upon time" as well.

Last month, the "Mr. Know It All" singer spoke about surrounding herself with people on the same page as her, adding that sometimes "people could be bad for you in a certain time."

"And I think that everybody just goes, 'Oh, well that means they're bad.' Well, it doesn't necessarily mean that, it just means that you're on different paths," she said during an episode of her talk show. "And I think that that's okay. Everybody's on a different learning curve, and everybody's learning something different at different times."