This vitamin group, which includes folate, B6, and B12, helps brain function in various ways. In particular, getting adequate B vitamins helps your brain respond appropriately to stress. Get your daily B dose via: Chickpeas and other legumes for vitamin B6.