I, too, have panic attacks. I am taking Librax which relaxes me and also my tummy. It has really helped me. Also, I have Xanax for a really bad attack but it's pretty heavy duty stuff and will make you sleepy. I only take it rarely.
For the "D", do you take Imodium? It's my best friend next to Phazyme for gas.
Something else that helped me was to keep a food journal so that I knew what my triggers were.
You might want to do a search for "panic attacks" and see what others have had to say in the past.