Hi,
I'm glad they found out what was causing the pain. This may be a stupid question, but have you tried learning meditation and deep breathing? I read once that most people don't know how to breathe properly - meaning exhaling slowly and completely and inhaling (using the stomach muscles), filling the lungs completely and holding it for a few seconds. If you get out of the habit of doing those SHALLOW breaths, this may help your panic attacks.
Also try not to let the panic feeling scare you, because this ony makes them worse. Just recognize it, then implement the deep breathing and reassure yourself that you're gonna be okay. You can also try a magnesium supplement which is good for the muscles and a hot bath with epsum salts. I hope your pain goes away soon.