The 28-year-old tested positive for the substance, which she has been taking since 2006 for health issues.
The International Tennis Federation said she will be provisionally suspended from 12 March.
Sharapova posted the message below to her fans on Facebook on Wednesday evening.
She wrote: “I woke up yesterday morning with an inbox, in full capacity of love and compassion.
“The first email I immediately opened was from my best friend, you know, the type of person who can make you smile and cry with only one word and who I spent the evening on the phone with, checking up on me, how was I doing?
“On average, I love the mornings. New day, new start. It is fair to say that this day was not average. Nothing came to mind at 6am, except that I am determined to play tennis again and I hope I will have the chance to do so. I wish I didn’t have to go through this, but I do – and I will.
“I needed to sweat, to push through and grind as I have done most of my life, so I made my way to the gym. That’s when I realized a bunch of tinted windowed cars were following me. The good old paparazzi, back on the trail.
“I have not been online much except the odd search for a new antique coffee table (random, I know), but my friends made a collage for me with all your beautiful messages and hashtags that you created (#IStandWithMaria and #LetMariaPlay). I spent the afternoon reading them next to my dog, who couldn’t quite understand why this was more important than the walk he was expecting to take.
“In this moment, I am so proud to call you my fans. Within hours of my announcement, you showed me support and loyalty, which I could only expect to hear when someone would be at the top of their profession.
“I wanted to let you know that your wonderful words put a smile on my face. I’d like to play again and hope to have the chance to do so. Your messages give me great encouragement. This message isn’t anything else but to say thank you. Thank you very much.”
MORE: The latest tennis news