Avicii's heartbreaking final years wracked with pain and taking '20 pills a day'.

This time three years ago, the dance music industry was shaken to its core by the tragic death of one of its brightest stars - Avicii.

The Swedish DJ sold tens of tens of millions of records and constantly sold out arenas, but behind the scenes, the pressures of fame saw him battle anxiety and alcohol abuse.

And after doing 813 shows in eight years, the exhausted star told his team: “I have said, like, I'm going to die. I have said it so many times. And so I don't want to hear that I should entertain the thought of doing another gig.”

He walked away from touring for good in 2016, but sadly it wasn't enough to save the troubled 28-year-old, who took his own life in Oman on April 28, 2018, leaving his family and fans distraught.

Avicii's rise to become one of the biggest names in dance music started in 2011 when he released his first EP, Levels.

A huge hit around the world, it propelled the young star into the stratosphere and soon he was in demand to work with some of the biggest names in the business.

Avicii became one of the most in-demand DJs in the world overnight.

However, the constant touring, promotion and life on the road quickly started to take its toll on Tim, who suffered from excruciating health problems that left him in agony and hospitalised.

Harrowing footage laid bare the superstar DJ's devastating battle with pain and illness that plagued him as he flew around the globe.

Avicii: True Stories revealed what life was like for the shy DJ as it opened the doors on what really happened backstage on his relentless round-the-world tours.

Tim was just 21 when his track, Levels, launched him into the mainstream.

The shy, quiet young man from Stockholm had given everything to pursue his dream of being a DJ and music creator.

Recording with friends, he soon came to the attention of promotor Arash Pournouri.

Initially playing small shows, it was after playing the then unreleased Levels at Governor's Island in New York that word really started to spread about the young prodigy from Sweden.

Swedish DJ Avicii took his own life in Oman aged just 28.

The impact of the song was huge and catapulted Avicii straight to the A-list.

From playing small club nights in his native Stockholm he was headlining the Ultra festival with Madonna.

And that's when things really started to change for Tim.

He told the documentary: "For the first time I could afford a tour manager and didn't have to fly coach everywhere by myself.

"I was a young, single guy and everything was one big party. We realised we could tour the whole year round so that's what we did."

And soon the shows starting racking up at an alarming rate - hundreds in just one year but for shy Avicii, it was starting to take its toll.

He said: "In the beginning I was too afraid to drink before shows because I was afraid I'd screw it up but I realised I was too stiff so I started having a couple of drinks before going on.

Avicii was hospitalised with pancreatitis.

"I saw other DJs drinking, who had been doing that for 10 years for every show."

It was during his Australian tour that the first serious signs something was badly wrong became apparent.

Avicii was on a flight when he started suffering from agonising stomach pains and was rushed to hospital when he landed.

He was diagnosed with pancreatitis and told he was not well enough to perform.

In chilling footage, the DJ - clearly in a huge amount of pain - was seen asking if it’s possible for him to be discharged so he can continue with his tour.

Doctors strongly advised against him performing. Unable to eat or drink without pain, an exhausted looking Avicii was clearly struggling.

Avicii warned his team that he was exhausted.

He said: "The hospital visit was a terrible experience but what was much worse was the pain afterwards.

"I would wake up every day and was in pain. It was constant and everything was in a haze and I didn't know how long I could keep going like that."

But things were not slowing down for the world's most in demand DJ. In 2013 his single Wake Me Up launched him into the stratosphere and the touring became relentless.

Avicii, who admitted he "hates being the centre of attention", was struggling to cope.

He said: "I was in so much pain but all I was given was medicine and told 'take this and you'll feel better'.

"It was like heroin but it also wasn't helping the pain but I just assumed the doctors knew what they were doing.

"Having the pancreatitis wasn't the problem, it was the pain that stays with you afterwards. At first it was for a month and then it was for four months.

"I was taking 20 pills a day but they kept telling me it wasn't addictive. I was still anxious and then I started touring again."

While flying around the globe on private jets and playing in front of huge crowds of adoring fans sounds amazing, in reality it was having a devastating impact on Tim.

Heartbreakingly, Tim said: "I didn't believe I could slow down and I didn't believe I could tour differently to the way I was.

"I could see other people doing what I was doing and they were fine. I started to feel crazy. I had everything on the checklist so I should be happy.

"I didn't give myself time to stop and recover, not just from the pain and the medication but also the illness and all the years of touring and stress. I just kept going."

In 2014 he had an operation to remove his gall bladder and appendix - but his problems were far from over.

By 2015, Tim was battling anxiety while he constantly toured and tried to work on his second album, the hugely successful Stories.

He said: "There was never an end to the shows, even when I gave myself a few months off I couldn't relax because my mind was always focused on when I was going to start touring again."

Desperate, he cancelled all his shows for the next eight months and gave himself some time away from the live scene to work on his album.

Renting a villa in Ibiza and undergoing therapy for his anxiety, Tim started to feel better but his friends admitted his return to touring and performing live was a "ticking time bomb".

Eventually, Tim snapped.

He said: "I've been away for six months and I've done everything I can and straight away I'm stressed and I still don't like performing.

"I don't know how to explain to people that my life is all about stress."

Unable to carry on, Tim penned an open letter to his fans, telling them he could no longer perform live.

It said: "I know I am blessed to be able to travel all around the world and perform, but I have too little left for the life of a real person behind the artist.

"My path has been filled with success but it hasn't come without its bumps.

"I've become an adult while growing as an artist, I've come to know myself better and realise that there's so much I want to do with my life.

"I have strong interests in different areas but there's so little time to explore them."

He took the opportunity to thank his brother and manager Ash, his team, artists and musicians he's worked with and fans.

"But last but not least thank you to every fan who has ever bought a ticket or snuck in, bought a song or downloaded it, commented on posts or hated at them.

"It's your thoughts and ideas about the music that helped me evolve and I do owe everything I have to you."

Just a month after retiring, Tim seemed to be on the road to recovery.

In a poignant interview he said: "It's only been a month since I did my last show and I feel like I did when I was 18."

Just two years later, on April 20, 2018, he had taken his own life.

Following his tragically early death, Tim's family released a moving open letter to his fans.

It said: "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.