A 2016 study found higher rates of depression and anxiety in people who have migraine.
Based on the research, headaches, anxiety, and depression may be directly linked through a common neurological issue or indirectly linked through unintended side effects if the person with anxiety or depression is being treated with medication.
Moreover, going to sleep with a headache could lead to a lack of sleep, contributing to anxiety for some people. Or, if you have a headache, you may experience anxiety and worry about being unable to perform properly at work or during an important test.
Anxiety may also set off your fight, flight, or freeze response. This response could lead to increased muscle tension (particularly the muscles in your face, head, and neck), which may cause headaches.
Still, there are methods you can use to manage these anxiety headaches.