I'm sorry to hear about your struggles with anxiety and panic. This is understandable, especially with frequent or extremely painful migraines.
Like Ann, I have a plan of what to do if a migraine or anxiety plaques me. I carry enough medication with me to take the edge off a migraine and I don't go far from home if I don't feel well. Unfortunately, the latter is not the healthiest because I tend to stay home a lot more than I used to for fear of a major migraine. But that is more because I don't want to be stuck somewhere with a migraine.
Good luck and know that you're not alone.