Mark Ronson has described penning Shallow with Lady Gaga as a type of “therapy”.

The DJ and record producer worked with the singer-songwriter and two other writers on the tune for the soundtrack of the film A Star Is Born, with Shallow going on to become an international hit and collect the Oscar for Best Original Song at the 2019 Academy Awards.

Ronson and Gaga began work on Shallow while they were producing her 2016 album Joanne, a time in which the musician was facing struggles in his relationship with wife Josephine de La Baume and Gaga had split from her actor fiance Taylor Kinney.

“We were all going through relationship s**t,” he recalled in an interview with WSJ. Magazine. “Everybody was willing to bring their troubles to that song. (The process was) like therapy, even though there’s so much hurt in this song.”

Ronson and French actress/singer De La Baume separated in 2017 and finalised their divorce in October. And while the 43-year-old has been focusing on making his upcoming fifth studio album Late Night Feelings in the wake of his split, with the record featuring Miley Cyrus song Nothing Breaks Like a Heart, he insisted that he didn’t originally set out to write songs about love and relationships.

“It wasn’t conscious — I wasn’t like, ‘OK, I’m gonna make this my breakup album.’ I don’t want to seem exploitative. (De La Baume has her) own pain and trauma. Both of us are… living it. The simple fact of the matter is I was going through these things, and I had to make a record. They were gonna collide at some point,” the star reflected. “This was writing from the point of view of an emotion first, then figuring out the beat. What’s funny is this is my most melancholy record but my most consistently dance-y record.”