I don't know how you got here, I only know how I got to this place... and how to get out of that place. One day at a time I don't drink. Yesterday's gone and tomorrow's not here yet so just do one sober day at a time.
Speaking to your doctor is also a good idea, as alcohol withdrawal can be dangerous, besides really annoying. Medical supervision can make a safe and more comfortable detox.
Welcome to SR!