Publicly tumultuous relationships are a millennial rite of passage. But for 21-year-old R&B singer Kehlani Parrish, her high-profile romances almost killed her.

In March, Parrish, known professionally as Kehlani, was hospitalized in LA after attempting suicide following a social-media outcry: Some of her 2.8 million Instagram followers had hounded her, accusing her of cheating on Cleveland Cavaliers player Kyrie Irving with her ex-boyfriend, rapper Jahron Brathwaite, a k a PartyNextDoor.

But now, she’s trying to put all this controversy behind her.

“I think I learned to keep a little bit of my life to myself and cherish my time as a human being,” Kehlani tells The Post.

And though the Oakland native is now keeping her dating life quiet, she channeled her emotional roller coaster into her first studio album, “SweetSexySavage,” dropping Friday.

But instead of the expected gloomy ballads about heartbreak, Kehlani taps musical inspirations like India.Arie and TLC for a sleek coming-of-age record.

“I feel like this album is a lot more fun and brighter than my previous work,” she says. “It’s about me as a 21-year-old and the things I was experiencing through relationships and friendships.”

Until her health scare, Kehlani’s personal life was an open book. She was born in South Berkeley, Calif., while her mother was on the run from the police. She was raised by her aunt in Oakland, Calif., after her father died when she was a toddler, and her mother drifted in and out of prison for drug use.

At 14, Kehlani got her start in the music industry as a vocalist for teen band Poplyfe, and they placed fourth in 2011’s “America’s Got Talent” competition. But her performance caught the eyes of judge Piers Morgan and host Nick Cannon.

After a dispute with her group’s manager soon after the competition, Kehlani left the band without a penny to her name and couch-surfed across the Bay Area, stealing iPhones and singing in the streets for money. She’d even been banned from Walmart and Walgreens for stealing, according to an interview she once gave to the Fader.

But in 2014, fate intervened. Cannon reached out, took her under his wing and sent her to New York to record her first mixtape, “Cloud 19.” A year later, she signed with Atlantic Records and produced her second mixtape, “You Should Be Here,” a soulful R&B record that earned her a Grammy nom for Best Urban Contemporary album.

It was also around that time when her dating life started getting attention. In July 2015, she was rumored to be dating PartyNextDoor. By the new year, she was spotted with point guard Irving.

That relationship didn’t last long, either. By March, she removed photos of the basketball player from her social-media accounts, and soon after, PartyNextDoor posted a photo on Instagram of Kehlani’s hand holding his. It read: “After all the shenanigans, still got the R&B singer back in my bed.” And while all three parties in the supposed “love triangle” agreed that no cheating had taken place, Kehlani became the target of online bullying.

On March 28, paramedics arrived at her Hollywood home, where Kehlani was reportedly found unconscious, and put on psychiatric hold.

Hours later, she uploaded a photo to Instagram from a hospital bed with an IV in her arm. “Today I wanted to leave this earth . . . No one was cheated on and I’m not a bad person,” the caption read.

After being released from the hospital, Kehlani deleted her posts, temporarily deactivated her social-media accounts, and went back to the studio to record her album.

And while her previous mixtapes were heavy on breakup anthems, Kehlani says this album is all about owning her narrative.

If I’m lucky enough, and the right person comes along that I can date with all my craziness — that’s great. - Kehlani

In the sultry ditty, “Undercover,” the artist, who identifies as bisexual, asserts her choice to love whomever she wants. The rare reference to heartache comes in “Advice,” a rueful number about taking agency and leaving a toxic relationship.

“As a young person who’s very intuitive, I don’t always follow through with listening to myself,” she says. “I think we’ve all gone through a relationship heartbroken, and at the time we knew better, but took time to [leave].”

For now, Kehlani says she’s happily single and preparing for a 60-city world tour, which kicks off next month, stopping in Manhattan’s PlayStation Theater on Feb. 22.

“I’m focused on work,” she says. “And if I’m lucky enough, and the right person comes along that I can date with all my craziness — that’s great.”