The singer split from the rapper earlier this year, but a source tells ET that they "always shared a deep connection."
Following the news of Mac Miller's death from an apparent overdose on Friday, a source tells ET that his ex, Ariana Grande, is "devastated" by the tragic news.
“Although the two ended their relationship, Ariana always shared a deep connection with Mac and wanted nothing but the best for him," the source added of the couple, who announced their split in May after nearly two years together. "Ariana is very upset."
A second source also tells ET that Grande is heartbroken, adding, “Despite their split, Ariana had always been supportive of his sobriety."
Grande and Miller, real name: Malcolm James McCormick, were first romantically linked in August 2016 and released several songs together, including "The Way" and "My Favorite Part."
Following their split earlier this year, Grande took to Instagram to address the breakup.
"This is one of my best friends in the whole world and favorite people on the planet Malcolm McCormick," the 24-year-old "Sweetener" singer wrote at the time, sharing a snap of the pair holding hands.
"I respect and adore him endlessly and am grateful to have him in my life in any form, at all times regardless of how our relationship changes or what the universe holds for each of us."
"Unconditional love is not selfish," she continued. "It is wanting the best for that person even if at the moment, it's not you. I can't wait to know and support you forever and I'm so proud of you!!"
However, following Miller's arrest on a DUI charge later that month, the singer addressed the rapper's struggles with sobriety on Twitter, in response to a Twitter user who wrote, "Mac Miller totaling his G wagon and getting a DUI after Ariana Grande dumped him for another dude after he poured his heart out on a ten song album to her called the divine feminine is just the most heartbreaking thing happening in Hollywood."
Grande, who is now engaged to Saturday Night Live star Pete Davidson, replied with a lengthy response, calling her relationship with the rapper, and his sobriety, "toxic."
"How absurd you minimize female self-respect and self-worth by saying someone should stay in a toxic relationship because he wrote an album about them, which btw isn't the case (just Cinderealla is ab me)," she tweeted. "I am not a babysitter or a mother and no woman should feel that they need to be. I have cared for him and tried to support his sobriety & prayed for his balance for years (and always will of course) but shaming/blaming women for a man's inability to keep his sh** together is a very major problem."
"Let's please stop doing that," the singer continued. "Of course I didn't share how hard or scary it was while it was happening but it was. I will continue to pray from the bottom of my heart that he figures it all out and that any other woman in this position does as well."
See more on the former couple's relationship in the video below.