"What I've learned is that this illness is not something that disappears or fades with time," the 25-year-old star wrote.

"It is something that I must continue to overcome and have not done yet," she wrote.

"I want to thank God for keeping me alive and well," she said, adding that she was "forever grateful" for the support of her fans and crediting the staff of Cedars-Sinai Medical Center in Los Angeles with saving her life.

In June, Lovato released a song entitled "Sober" in which she indicated a relapse and apologises in verse to her parents.

The singer, whose hits include "Sorry Not Sorry," was rushed from her home to a hospital by emergency responders. It remains unclear on which drug she overdosed.

Her overdose prompted a flurry of statements of solidarity from fellow stars who praised her personality -- although the attention also triggered a backlash by social media users, who noted that many non-celebrities suffer from drugs with little fanfare.