Xanax is not something I would be comfortable taking, and I suffer from major anxiety and panic attacks. I also would not be comfortable seeing a doctor willing to prescribe it to me with my history. I don't have a history of abusing benzos but still.
I don't know what you are being prescribed it for but if it is for anxiety there are lots of safer medications our there to try. I have had success with high dosages of SSRIs and I especially like beta-blockers, essentially blood pressure meds that control adrenaline production which shuts down the flight/fight response. Obviously though, that is something to discuss with a board certified psychiatrist (not a general MD), preferably one with some experience treating patients with addiction. Anyways, good luck. You are definitely at the roughest stage. Getting sober is hard work but it gets better.