The musician, whose real name was Tim Bergling, was found dead on April 20 in Muscat, the capital of the Gulf sultanate Oman, where he had been on holiday with friends.
“He really struggled with thoughts about Meaning, Life, Happiness,” his family wrote in the letter, seen by AFP.
“He could not go on any longer. He wanted to find peace,” they added.
A spokeswoman for the artist declined to confirm whether he had committed suicide.
A police source in Oman said his death was not considered to be suspicious, adding that the circumstances would remain confidential at the request of the family.
He had made no secret of his health problems, including pancreatitis, triggered in part by excessive drinking linked to his party lifestyle.
“Tim was not made for the business machine he found himself in; he was a sensitive guy who loved his fans but shunned the spotlight,” his family said.
In 2016, Avicii stunned fans by announcing his retirement when he was just 26, saying that he wanted to leave the high-flying electronic music lifestyle.
“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,” his family said.
His biggest hits included “Wake Me Up,” which went to number one across Europe in 2013 and featured the soul singer Aloe Blacc.
Avicii — who for years was one of the world’s most lucrative electronic musicians — in 2016 made number 12 on the list of top-paid DJs of Forbes magazine, which said he earned $14.5 million in the previous year.
“Our beloved Tim was a seeker, a fragile artistic soul searching for answers to existential questions,” his family said.
Avicii was among the first DJs to break through into the mainstream as electronic dance music grew over the past decade from nightclubs to Top 40 radio.
“An over-achieving perfectionist who travelled and worked hard at a pace that led to extreme stress,” his family said.