A human scientific study from Japan has found significant correlation between panic / anxiety attacks, vitamin B6 and iron levels in the blood. 
The study indicates that if you get occasional panic attacks marked by episodes of hyperventilation, you might be encountering the symptoms of a basic supplement inadequacy that is easily corrected.
Panic attacks and hyperventilation attacks are paroxysmal psychiatric events, and the symptoms occur suddenly. Panic attacks are diagnosed by the sufferer experiencing at least four of the following symptoms: Palpitations, pounding heart, or accelerated heart rate. Sweating. Trembling or shaking. Sensations of shortness of breath or smothering.
Numerous other sources have reported on this however many of them have made a critical error, stating that it is simply “B vitamins and iron” that are linked to the disorders – however the researchers tested several types of B vitamin and found B2 and B12 to be unrelated to panic attacks / hyperventilation attacks. It is specifically a lack of vitamin B6 that correlated strongly to the disorder.
However, it is worth noting that B vitamins in general are associated with better mental health. Other symptoms of vitamin B deficiency may include agoraphobia, anxiety, fatigue, irritability, and emotional instability.
Serotonin, the brain’s “happiness chemical” is synthesized in the body from its precursor (“building block”) tryptophan, and it is well known that vitamin B6 and iron each play important roles as cofactors in the synthesis of serotonin in the human body. An additional factor includes obtaining tryptophan, an amino acid, from the diet.
Pumpkin seeds are a rich source of tryptophan. Other rich tryptophan sources include turkey (responsible for the sleepy feeling after turkey dinner!), grapefruit juice, tuna, eggs, Mozzarella, chia seeds, sesame seeds, pistachios.
See also our full reports on Vitamin B6 and Iron – which also include lists of foods rich in these essential nutrients.
You can also obtain Vitamin B6, Iron and Tryptophan (via 5-HTP) as supplements. If you are looking to supplement with B vitamins, it is advisable to purchase top quality whole food-based varieties such as those produced by companies like MegaFood (rave reviews on Amazon!) and Garden of Life.
Sources and References:
 Low Serum Concentrations of Vitamin B6 and Iron Are Related to Panic Attack and Hyperventilation Attack. (2013) Full study (PDF) lib.okayama-u.ac.jp