After years of battling health issues, the world-famous musician died aged 28 in Muscat, Oman, where he had been vacationing at a luxury beach resort with a group of friends.

Born Tim Bergling, in Stockholm on September 8, 1989, Avicii was part of the wave of DJ-producers, like David Guetta, and Calvin Harris.

The DJs broke out on the scene as lead performers in their own right, earning international hits, fame, awards and treated like pop stars.

Avicii's death comes just days after he was nominated for a Billboard Music Award for top dance/electronic album for his EP Avicii (01), which he released last August.

Advertisement

But behind the scenes of his party lifestyle, Avicii was battling health problems, reports the Daily Mail.

Documentary footage, filmed between 2013 and 2016, offers a glimpse into the severe issues he was up against.

Avicii battled with acute pancreatitis - which is a potentially life-threatening inflammation of the pancreas - due in part to excessive drinking.

As a result he had his gallbladder and appendix removed in 2014, cancelling a series of shows in attempt to recover.

The rock'n'roll lifestyle permanently halted in 2016 when Avicii announced he would quit touring in order to focus on his health and recovery.

The documentary video shows the 28-year-old appearing disoriented and light-headed as he tried to grasp what day it is.

He looked exhausted, and his eyes went into a haze and rolled back into his head several times.

Although the DJ had been hospitalised in the past for excessive drinking, he claimed to have never taken the drug MDMA or Molly, which is known for being popular with fans of his music.

In an interview with GQ in 2013, he said: "I mean, I want to take it. But I'm sort of afraid of anything that makes you feel out of control."

In the piece, he also touched on his battle with anxiety and drinking.

He said: "You are traveling around, you live in a suitcase, you get to this place, there's free alcohol everywhere—it's sort of weird if you don't drink.

"I just got into a habit, because you rely on that encouragement and self-confidence you get from alcohol, and then you get dependent on it."

Avicii built a strong musical and personal friendship with American record producer Nile Rodgers, who called Avicii his 'little brother'.

November 2011: Avicii performs in NZ at Our:House. / Supplied by SnapStarLive

Speaking of Avicii's death, Rodgers said: "I'm shocked because I don't know medically what happened, but I can just say as a person, as a friend, and more importantly, as a musician, Tim was one of the greatest, natural melody writers I've ever worked with, and I've worked with some of the most brilliant musicians on this planet.

Rodgers said his last performance with Avicii - about three years ago - upset him because of Avicii's drinking.

"It was a little bit sad to me because he had promised me he would stop drinking, and when I saw him he was drunk that night. And I was like, 'Whoa. Dude. C'mon. What are you doing? What's going on? You said that that was done,'" Rodgers recalled.

"We did a show and I was a little upset. I didn't even stick around for his performance because it was breaking my heart. But we still had a great time. It was wonderful - we were that close."

Speaking at the time of his decision to stop touring, Avicii said in a statement:

"It's been a very crazy journey. I started producing when I was 16. I started touring when I was 18. From that point on, I just jumped into 100 per cent," Avicii told Billboard magazine in 2016.

"When I look back on my life, I think: 'whoa, did I do that'? It was the best time of my life in a sense. It came with a price - a lot of stress a lot of anxiety for me - but it was the best journey of my life."

What is acute pancreatitis and how is it different from pancreatitis?

Pancreatitis, inflammation of the pancreas, can come on quickly, when it is described as 'acute', with symptoms ranging from mild to severe.

It also can be a long-standing problem, when it's known as 'chronic', where the pancreas slowly becomes more damaged over time.

The most common symptom for both is pain in the abdomen that radiates to the back, along with nausea and vomiting.

The theory is alcohol can cause the pancreatic duct to spasm, blocking the release of digestive juices.

That inflames the pancreatic tissue. Other less common factors are faulty genes and viral infections such as measles or mumps.

The dead tissue is vulnerable to infection and can lead to organ failure, so it needs to be removed.

Around 25,000 cases of pancreatitis every year in Britain are acute. In 80 per cent of these, patients recover within a week.

However, 5 per cent of patients will be extremely unwell, with serious and even fatal complications.