Charlie Puth tried to help Mac Miller ''get clean'' before his devastating death.

The 'We Don't Talk Anymore' hitmaker had become ''really good friends'' with the 26-year-old rapper - who sadly died from a suspected drugs overdose last week - in the six months leading up to his passing and he was hopeful that he could help him turn his life around after years battling with substance abuse.

Speaking to E! News, the 26-year-old singer said: ''We talked almost every day and I don't get a lot of friends who come into my life who I hit it off with so quickly. I had known him for about six months, but we became really close, we became really good friends and I always thought I'd be the one to help him get clean and to lead him onto the path of a good, clean, sober life.''

However, Charlie now blames himself for the 'Dang!' hitmaker's death as he doesn't feel he ''did enough'' for Mac because he was so busy with work.

He added: ''Every time someone close to me passes away I always text their phone and--I don't know why I do this often--I just wrote, 'I love you man,' and I knew he wasn't going to write back but I just felt like I had to do it anyway.''

Charlie took to his social networking sites after the news of Mac's passing surfaced online last week and admitted he was so ''happy'' he got to know him.

He wrote: ''This is not real, I'm waiting for you to call me and say it was just a joke. I texted your phone before I know u got it.

''I can't keep losing friends like this...I wish I spent more time with you these past weeks...I'm so sorry... rip wrote the soundtrack to my college years and I'm so happy I got to know you...this sucks this really really sucks. (sic)''

An autopsy into Mac's passing was completed this week but, although his body has been released to his family, there are still some additional tests pending before his exact cause of death can be announced by the coroner.

Los Angeles County coroner's spokeswoman Sarah Ardalani told ''The autopsy was completed and a cause of death has been deferred pending additional tests. His body has been released.''