Avicii was hanging on a yacht and sipping a drink the day before his death ... and appeared to be happy and healthy.
In the photo -- obtained by TMZ -- the world-famous DJ is chilling with a couple guys on a boat while flashing a peace sign. We're told it was taken Thursday in Muscat, Oman ... where he was staying nearby at the Muscat Hills Resort.
Avicii has a drink in his hand, but it's unclear if it's alcoholic or not. Avicii said in a 2013 interview he stopped drinking due to pancreatitis and was living a sober lifestyle.