Why Anxiety Shows Up — And How to Face It Head-On Xanax helps with migraine pain as well. Different medications treat migraine, but Xanax is directly used for the treatment of anxiety attacks and panic attacks. johncalvin1234 .