When you think of stress eating, what comes to mind? It’s probably not going to town on three bags of lettuce! Statistics show that when stressed we tend to crave sugary, carby comfort foods, like ice cream, mac and cheese, or cake. Why is that?

The answer lies in our brains. When we’re stressed our brains produce cortisol and adrenaline, chemicals that facilitate the flight or fight response to threatening environmental stimuli. From an evolutionary perspective, this reflex helped our ancestors avoid danger. But in our modern society, it’s not always possible, or socially appropriate, to fight or run away from stressors. So, we’ve taken the matter of modernizing our stress response into our own hands. Or in this case—our mouths.

When we eat sugar, it acts as a chemical balancer decreasing our cortisol levels in the short-term, which explains why it’s often the first thing we reach for when stressed. But the feeling of relief is only temporary, and when it wears off, the stressors (deadlines, financial worries, the news, relationship woes) usually remain.

This kind of stress eating can not only lead to physical health problems, but also to lasting impact on our mood—even to the point of feeding chronic depression and anxiety.

The good news is the same nutritional neuroscience used to expose the vicious sugar cycle has also illuminated some positive food-to-mood relationships. We can use this knowledge to adapt a healthier version of stress eating, one where we eat mindfully to minimize stress instead of eating mindlessly because we’re stressed. To help build up biochemical resilience to stress, try incorporating some of these food strategies into your regular diet:

1. Go a little nuts – Nuts are chock-full of B vitamins, which can help keep our neurotransmitters happy and minimize fight or flight responses.

2. See to some vitamin C – Fruits and berries like oranges, kiwis, strawberries and veggies like red bell peppers, kale and broccoli all have high concentrations of this essential vitamin, shown to lower blood pressure and cortisol levels.

3. Fish for omega-3s – Fish like salmon and tuna are high in DHA and EPA, types of fatty acids that can help improve cognitive function and reduce anxiety.

4. Be like Popeye – Eating magnesium-rich spinach and other leafy greens can help regulate cortisol and blood pressure and has been shown to help alleviate anxiety and depression.

5. Choose carbs wisely – Unlike other starchy carbs, oatmeal can satisfy a craving for warm and comforting without spiking your blood sugar. Craving something sweet? Dark chocolate with at least 70% cocoa provides more antioxidants than conventional candy bars for a sweet treat that better lowers cortisol and adrenaline.