If you mindlessly munch after a stressful day at work, or crave less nutritious foods when worries arise, you are not alone. Stress can affect us in many ways, and one of the most common is increased appetite.

According to the American Psychological Association, 27 percent of adults say they eat to manage stress, and 33 percent report overeating or eating unhealthy foods to distract themselves from stress.

On a biological level, stress eating happens when cortisol levels rise and trigger the body’s fight or flight response, stimulating our appetite so we eat more to survive. This means our brains tend to associate stress with food, even when it’s not the most effective solution.

“To successfully re-train this connection, we need to think in terms of evolving the habit, rather than simply eliminating it,” says Adam Perlman, M.D., meQ co-founder and chief medical officer.

The key, he says, is to find healthier, more productive ways of managing stress and our response to it. Get started with these four tips.

1. Choose Your Tools

There’s a reason we crave carbohydrates and sugar-filled foods when we’re stressed. These foods, says Perlman, give our body a sense of relief that can create a cycle of positive reinforcement.

But there are other in-the-moment ways to relieve stress, such as breathing, meditating, or going for a walk. The key is to choose one or more of these “tools” as your go-to before becoming stressed.

“A mistake I see often,” says Perlman, “is when people commit to removing a habit without having another tool that works for them. Relying on these tools for the first time in a moment of stress is like learning to use a nail gun as you’re building a house.”

It is crucial to practice using these tools before putting them to the test, so you can receive and encode these behaviors in a relaxed state.

2. Interrupt the Cycle

While the connection between food and stress has biological roots, it is often socially reinforced. “It can be imprinted as early as infancy,” says Perlman. “When a parent immediately gives their child a bottle every time they show distress, that creates an automatic association.”

As adults, we have the ability to ask ourselves what we need. “We need to be mindful,” says Perlman, “and bring awareness to our stress.”

Recognize when you have experienced a stress trigger, such as a particularly challenging meeting, and practice interrupting the cycle with a quick pause. Use that pause to check in with yourself. Maybe you journal for two minutes about what you’re feeling, or take a couple of deep breaths. Then use that awareness to determine whether you are in fact hungry. Whatever action results from that pause, you’ll know it’s intentional and more likely aligned with your needs.

3. Stock Alternatives

Rather than putting your willpower to the test, which studies show can deplete decision-making abilities over time, Perlman recommends thinking in terms of alternatives.

“If you tend to reach for candy when stressed,” he says, “maybe you keep a healthier alternative on-hand, such as frozen grapes.” This way, the focus is not on resisting temptation, but rather on evolving the habit to look different in the moment.

The science of behavior change suggests that we want to add friction to the behavior we’re phasing out, so that it’s harder to do, and decrease friction on the positive behavior, so it’s easier to do.

4. Forgive Yourself

Stress eating can be a deep-rooted habit, and it’s natural to experience some resistance when trying to redirect a habit that has been formed over time. The important thing is to be patient with yourself and forgive any slip-ups along the way.

“In the midst of trying to shift habits,” says Perlman, “we all revert back to some of the very core habits we’ve had for most, if not all, of our lives. The important thing is to get back on the horse, rather than taking an all-or-nothing approach.”