Thanks for your question
You are now in 27th week of pregnancy
and having anxiety
and panic attacks.
Usually development of fetus organs is complete by 12th week so most of the doctors avoid prescribing drugs during that period. Any medicine during pregnancy carry risk but the risk is more in 1st trimester.
As per my opinion you can take low dose benzodiazepines for ANXIETY and PANIC attacks on SOS basis. And if the symptoms are persistent then Tab. Fluoxetine
or some times Escitalopram can be taken, these are very good medicines and have comparatively safer pregnancy profile. Before starting any medicine please take opinion of your gyane doctor.
And if you can do then you can try Deeb Breathing Exercises or Progressive Muscle Relaxation
techniques for non medicinal management of anxiety. You can take help of youtube.