The singer thanked her fans for their love and support.
"Your positive thoughts and prayers have helped me navigate through this difficult time."
She also thanked her family, team and the staff at Cedars-Sinai who have by her side the whole time.
"Without them I wouldn't be here writing this letter to all of you," she wrote.
"I now need time to heal and focus on my sobriety and road to recovery. The love you have all shown me will never be forgotten and I look forward to the day where I can say I came out on the other side.
"I will keep fighting."
Lovato indicated in a new song released last month that she had relapsed after six years of sobriety.
On the song Sober, she sings the lyrics: "Mumma, I'm so sorry I'm not sober anymore/And daddy please forgive me for the drinks spilled on the floor."