Ariana Grande, shown here during a 2018 concert in Los Angeles, recorded a breakup track about Pete Davidson, called "Thank u, next." (Mario Anzuoni/Reuters)

There are songs for every stage of a breakup — many of them sad and weepy. When you’re deep in denial or anger, for example, you might blast the Weeknd, Rihanna, Adele or Sam Smith.

But once you’ve cried it out and are feeling ready to move on? Crank up the upbeat breakup track that’s packed with positivity and acceptance. The 21st century has brought dozens of breakup songs about being stronger after a split. Think Destiny’s Child’s “Survivor,” Kelly Clarkson’s “Stronger,” Katy Perry’s “Part of Me.” In recent years, we’ve seen a new kind of breakup song that’s tossing the tough-girl attitude aside to focus on self-love.

You have to love yourself before you can love someone else.

It’s a cheesy concept, but in the era of the “like” button and heart-eyes emoji, it rings true. Dating experts and life coaches preach self-love; therapists try to nudge their clients there. Protagonists in romantic comedies typically have to find confidence from within before they can find love that lasts. And with “Thank u, next,” Ariana Grande is just the latest pop star to come out with a breakup anthem oozing with self-love and gratitude.

In “Thank u, next,” Grande praises her exes for teaching her love, patience, how to deal with pain. She then flips those attributes and applies them to herself: “She taught me love / She taught me patience / How she handles pain.” And guess what? Grande sings about moving on to another relationship — with herself: “I know they say I move on too fast / But this one gon' last / 'Cause her name is Ari / And I’m so good with that.”

Singing about a past relationship in a positive way can be tricky. On Sunday, Grande tweeted that two of her exes mentioned in the song — Ricky Alvarez and Big Sean — got to hear the track before it went public. (Grande’s ex Mac Miller died on Sept. 7.) It’s unclear whether Pete Davidson, to whom Grande was engaged, heard the song before its release, though he wished Grande well on “Saturday Night Live” this weekend.

Grande’s “Thank u, next” comes out just a few days after Carly Rae Jepsen’s new single, “Party for One.” The song’s video merges self-love with self-care, as, yes, Jepsen is reeling from a breakup. A “party of one” could sound sad, but a party for one sounds delightfully decadent. “I’ll just dance for myself, back on my beat,” as Jepsen sings, skipping the “what doesn’t kill you makes you stronger” step and accepting as a foregone conclusion that she’s already strong and can keep herself happy.

The video shows people checking into their various solo rooms and mourning their breakups and reveling in their alone time. Just as things get bouncing-on-the-bed good, the hotel’s power goes out, and everyone spills into the lobby for an impromptu party for many. The entire cycle arc of having fun on your own (or loving yourself) to enjoying yourself with others in less than five minutes. Would these strangers been able to have stream into the lobby and celebrate together if they hadn’t already had their solo soirees? Unlikely, Jepsen’s breakup anthem seems to say.

Most breakup songs diss an ex in some way. So if you’re preaching self-love, how do you do that without maligning anyone else in the process? Grande does it through gratitude. And Justin Bieber does it by singing about an ex that isn’t even his. His 2015 hit “Love Yourself” is about Ed Sheeran’s ex. Sheeran says he gave the song to Bieber because Sheeran found it “too personal” and “harsh” to sing about his own former lover. Even though the song has an upbeat message, it’s basically telling an ex they have a self-esteem problem. Positive message but a bit of a dig.

Yes, some self-love anthems go so far as to proclaim, “I love me,” as Hailee Steinfeld does in her 2015 “Love Myself.” In the video, Steinfeld also portrays self-love as a tangible, visible thing. As she dances right up against a mirror, the image of herself becomes two, showing visually that an internal relationship really is as important and real as the external ones we have.

Even though Steinfeld exudes confidence, belting out that she’s “gonna love myself, no, I don’t need anybody else,” she admits that she’s still learning to live those words. In an interview with Noisey, she said: “It’s been really amazing seeing boys and girls, men and women, people of all ages, sort of share how it’s affected them. A couple of girls have come up to me and said, ‘Thank you for this song which teaches me how to love myself.’ That I’m able to pass on this message while I’m still learning it for myself is just the most insane thing.”

At what point does all this self-love veer into narcissism? Meghan Trainor seems to cross that line in her 2016 song “I Love Me,” which repeats the title line so often it just comes off as vain. “I don’t mean to brag, I don’t mean to boast / I love all y’all, but I love me the most.” Trainor recorded the song with LunchMoney Lewis, so at least she’s not the only one on the track singing about how much she loves herself. But the song could have used a consult from Carly Simon — or Ariana Grande.

READ MORE:

How to break off your engagement or cancel your wedding the right way

His wedding date canceled. So he found a new one on Reddit.

‘So your interests in me are purely political?' Why millennials are taking their get-out-the-vote efforts to Tinder.