Both migraine and tension headache sufferers list emotional stress, and feelings such as anxiety, worry, fear, anger, and frustration that accompany it, as their most important trigger. But emotional stress is more than a trigger. It is part of the mechanism that produces a headache.
Emotional stress can contribute to headaches by:
- Interfering with natural pain suppression mechanisms
- Increasing the excitability of the brain
- Altering bloodflow to and within the brain
- Causing the release of histamine, a vasodilator and inflammatory substance
- Increasing musculoskeletal pain
On-going stress can lower your headache threshold, making it more likely that exposure to your other triggers will provoke a headache attack. Specific short term stressful episodes may trigger a headache attack. 
The role of emotional stress in provoking headaches is reasonably well appreciated. However few headache sufferers are aware that the sustained and excessive amounts of muscle tension may play an equally important role.
Nor are they usually aware of just how tight the muscles in their jaw, neck and shoulders actually are for most of the time. Sustained tension in these muscles is a common response to emotional stress.
It is also the result of maintaining the upper part of your body in a fixed posture. Sitting without moving for lengthy periods of time is a major culprit. Sitting with your neck craned forwards magnifies the problem. This “forward head posture”  will also cause pain in the joints of your neck.
Tight or tense muscles are muscles that are actively contracting. However, as we have seen, when muscles stay contracted for too long without relaxing they start to suffer microscopic tissue damage. Various inflammatory substances are released into the muscle fluid from where they are transported into the blood stream.
"when muscles stay contracted for too long without relaxing
they start to suffer microscopic tissue damage"
Hence on-going tension in neck, jaw and shoulders acts as a continual low level source of pain which can reduce your headache threshold. If trigger points are present, tension may irritate them sufficiently to provoke a headache attack.
Muscle tension, like emotional stress, lowers your headache threshold, making a headache attack more likely. Muscle tension can also act as a headache trigger.
 JM. Nash and RW Thebarge (2006). “Understanding Psychological Stress, Its Biological Processes, and Impact on Primary Headache.” Headache 46(9):1377- 1386.
 DG Borenstein, SW Wiesel and SD Boden (2004). Low back and neck pain: comprehensive diagnosis and management, p231-233, Edition 3, Elsevier.