Step away from the scales—it may not be the key to improving your mental health.

Despite the message that the happiest you is just 10 pounds away, new research suggests that improving the quality of your diet may be the recipe to protecting and even improving your mental health, not losing weight.

Over the past decade, dozens of studies have shown that maintaining a healthy diet is associated with both a reduced risk for developing depression (paywall) and an effective strategy for treating existing depression. But a review of mood-food studies has shown that the clear relationship between diet and depression is quite independent of body weight.

This was reinforced in a recent world-first trial where participants followed a 12-week dietary-improvement program for the treatment of depression. Most of the participants in the trial were overweight and remained so at the end of the intervention. But despite not having lost any weight, those who improved their diet experienced significant improvement in their symptoms, and one third of them experienced remission of their depressive disorder.

There’s no disputing the health importance of being a healthy weight. But while being overweight or obese (and the associated metabolic problems with both) are risk factors for depression, it doesn’t appear that being overweight prevents people from accessing the physiological and psychological benefits of eating well.

Our diet seems to exert its effects on mood through pathways that may not require change in weight.

The biology behind this is not yet clear, but our diet seems to exert its effects on mood through pathways that may not require change in weight. For example, a diet filled with fruits, vegetables, and plenty of fiber can improve the health of your gut microbiota through bacterial fermentation and the production of anti-inflammatory, short-chain fatty acids. This is likely to reduce the chronic inflammation that is a risk factor for depression, as well as other chronic diseases. This is because both microbiota and the immune system communicate with the stress-response system and enteric nervous system, which influences circulatory biomarkers that regulate our moods.

According to the evidence, a key step for good mental health is to reduce the amount of ‘extras’ we eat: foods that provide energy, but offer little to no nutritional value, such as chocolate, cake, chips, and other snack foods. We’re better off spending these calories on what are often referred to as ‘brain foods,’ which are often high in fat, but just as high in important nutrients. Fatty fish like salmon or trout, olive oil, and nuts are foundational to the Mediterranean diet, which is known for its benefits to both the brain and body. These foods, as well as greens and whole grains, are broken down into molecules that feed our gut bugs, which help build neurotransmitters, fight inflammation, and protect healthy brain cells.

Making changes to our lifestyles to improve how we feel and function is challenging, especially when we’re not feeling our mental best. Losing weight is a long haul, but the good news is that the benefits of eating well can be felt relatively quickly, whether you’re overweight or slim, and without maintaining a calorie deficit. Calories are necessary fuel, but the quality of calories matters.

Taking simple steps, like swapping chips or chocolate for fruit and nuts, may not make much of a difference to our calorie scorecard, but the benefits for both our mental and physical health quickly add up. Unlike some of the other factors that contribute to our mental health, food is a domain over which we have some control. So keep in mind: Small changes matter to mental health, whether the scales move or not.