Late rapper Mac Miller's posthumous collaboration with producer 88-Keys and Sia opens up about his heartbreak from past relationships.

That's Life, 88-Keys' first solo record in eight years, features Mac, who dated pop star Ariana Grande from 2016 until May last year, and died from a suspected drug overdose at the age of just 26 last September.

88, real name Charles Misodi Njapa, says in a press release that he and Mac came up with the idea for the song while discussing the highs and lows of their previous relationships.

"We all have to forge through the good, the bad and the ugly," he explained. "Mac came up with the concept for the song stemming from a conversation we had in the studio about relationships as we shared with each other what made the ones we were in at the time special."

He then took the song to Sia, who added lyrics based on her own personal experiences to the track.

"I played the song for Sia and she personally identified with the sentiments of the song and felt strongly about contributing her own thoughts on the subject matter," he added. "At the end of it all, my dear friend Mac and my new-found friend Sia helped me make a song to touch the world and help many deal with adversities we're faced with, but 'That's Life.'"

On the record, Mac, real name Malcolm McCormick, raps about how "it's hard to stay sober when you feel f**ked over", and "drowning that sorrow in a bottle".

Sia, who also battled depression, substance and alcohol abuse problems in the wake of the death of her then boyfriend Dan Pontifex in 1997, also sings about how "drugs don't fill the hole".

The release of That's Life, which debuted on Wednesday night, has been approved by Mac's family.