Prescription medication while TTC/pregnant?!

Danielle
Hi! I have extreme panic attacks and often need Xanax just to slow my pace down a little or my heart will beat through my chest, I only take .50 of xanax a day, at most 1mg if it's a really off day. Anyone have any insight on if it's safe? 
I'm so nervous to have to stop taking it! I have not talked to my doctor yet.