Sounds like a positive step towards getting better to me. I hope you do follow the doctors recommendations and the appointment with the rehab.
There is nothing inherently bad about having an addiction. It is not a reflection of you as a person, just a condition/affliction you suffer from. And there is no shame in getting help or being accountable to someone to help you get better. In fact, getting sober Is a sign of strength that you are willing to improve your life.