Tragically, the Stockholm-born Avicii had been battling ill health for years.
He announced in 2016 that he would no longer perform live, following years of health problems caused by stress and alcohol abuse, as well as severe anxiety.
At the age of 21 he was diagnosed with acute pancreatitis, due in part to excessive drinking.
In 2014, he was forced to have his gallbladder and appendix removed.
The superstar made millions during his career but famously said he didn't need that much money.
His devastated family confirmed last week in a poignant statement that he had left a suicide note and revealed that "he couldn't go on".
The statement, translated from Swedish, read: "Our beloved Tim was a seeker, a fragile artistic soul searching for answers to existential questions. An over-achieving perfectionist who travelled and worked hard at a pace that led to extreme stress.
"When he stopped touring, he wanted to find a balance in life to be happy and be able to do what he loved most — music.
"He truly battled thoughts about meaning, life, happiness.
"Now, he could not go on any more. He wanted peace.
"Tim was not made for the machinery he ended up in; he was a sensitive guy who loved his fans, but shunned the spotlight," the statement read.
"Tim, you will forever be loved and missed. Who you were and your music will carry on the memory of you. We love you, the family."
Where to get help
If you are worried about your or someone else's mental health, the best place to get help is your GP or local mental health provider. However, if you or someone else is in danger or endangering others, call police immediately on 111.
OR IF YOU NEED TO TALK TO SOMEONE ELSE:
• LIFELINE: 0800 543 354 (available 24/7)
• SUICIDE CRISIS HELPLINE: 0508 828 865 (0508 TAUTOKO) (available 24/7)
• YOUTHLINE: 0800 376 633
• NEED TO TALK? Free call or text 1737 (available 24/7)
• KIDSLINE: 0800 543 754 (available 24/7)
• WHATSUP: 0800 942 8787 (1pm to 11pm)
• DEPRESSION HELPLINE: 0800 111 757