If you feel good while exercising then this is more than likely anxiety causing panic attacks. What happens with a panic attack is your brain sends out the "fight or flight" signal, but at the wrong time. This floods your body with adrenaline which is needed in a "fight or flight" situation, so it has nothing to do when it occurs at the wrong time, and this is why we get hot, dizzy,shaky, scared....a panic attack. When exercising you are using this adrenaline and this is why you feel better. The busier you stay physically and emotionally the better off you are during panic attacks. It's difficult to say if your head pain is anxiety related, as it presents in many ways and at every level. You need to rule out other problems first, just like you are doing. Although you cannot take medication at this time, it would be a good idea to start some therapy to get to the root of your anxiety, and to learn coping and relaxation skills. If your heart is fine, and it turns out to be anxiety, you will have a head start and may also need medication. Only a professional can tell you if this is anxiety and if you need medication and which is best for you.