Okay, this time you’re serious. You’re going on a regimen that will really improve your health—not like that crash diet: You’ll snarf down antioxidants; exercise moderately but consistently; balance fats, proteins, and carbs; and pay attention to the way you explain whatever happens to you.

Wait a minute. The way you explain what happens? What does that have to do with physical health? According to findings from the burgeoning field of behavioral medicine, a lot. How we think can affect physical processes as surely as diet and exercise do. For example, putting a positive spin on events in our past is associated with an enormous array of health benefits, from improved immune function to reduced stress to quicker healing, with all their emotional and physical advantages. To some degree, we may be able to literally explain away many devastating physical problems. If you want to have a healthier body, I suggest changing your mind first.

So What’s Your Story?

Caroline, one of my brightest, prettiest, best-educated clients, was a wreck. Her pet cockatiel, Bonkers, had flown away.

The way she told the story of her bird’s disappearance—what researchers have called “explanatory style”—was making her situation much worse. Her explanation of Bonkers’ great escape showed the three key markers of pessimism: She described the problem as being personal (“I made it happen; these things always happen to me”), permanent (“Things will never get better”), and pervasive (“My whole life is rotten; I’m such a loser”).

On the other hand, I’d noticed that whenever something good happened, she explained it as a fluke. ” This cute guy from work asked me out,” she said one day. Caroline explained the man’s interest in her as his own “insanity” (not personal) and assumed it wouldn’t last (not permanent). She stressed that other people’s interest never lasted, even though I knew she had been the one to end most romantic relationships (not pervasive).

Bear in mind that Caroline didn’t think like this only when she talked to me. Day in, day out, her mind serialized every piece of bad luck into another episode in a continuing Saga of Doom and deflected every happy event into the Meaningless Trivia scrap pile. Her style was crushing her mood—and was probably damaging her body as well.

Why See the Glass Half Empty?

Despite its attendant miseries, there seems to be a useful place for a pessimistic explanatory style. Some people appear to downplay positive aspects of their situations to limit their expectations and help them feel less pressured. They’re less likely to feel let down if things go wrong.

Researchers Julie Norem and Nancy Cantor call this defensive pessimism. My friend Julia calls it inoculating yourself against disappointment. In the seven years I’ve known her, Julia has changed her explanatory style deliberately, gradually, and successfully. Giving up defensive pessimism may invite disappointment in certain situations, but overall, Julia’s quality of life and her physical health are benefiting as she turns herself into a thoroughgoing optimist.

This doesn’t happen overnight. If you’re a habitual pessimist, you know there’s nothing worse than those bouncy optimists.

Habitual thought patterns are like ruts in a dirt road. The mind slips into them over and over, and at first, steering down another route is extremely difficult. Stopping habitual thoughts as they flash along these pathways, turning one’s mental energy to a new way of thinking, requires an effort that is not merely impressive but heroic.

I’ve said it before, and I’ll say it again: The way to start changing your mind is not to force it or command it but to watch it. Jeffrey Schwartz, MD, who studies obsessive-compulsive disorders, teaches his patients “mindful awareness,” a form of meditation that can free them from intrusive thoughts—a technique that has also been shown to help other patients stop a blue mood from becoming full-blown depression. The idea is to identify a destructive thought pattern, then simply label it and watch it and let it pass by whenever it appears in your mind.

When Caroline did this, her mood changed immediately. Instead of drowning in thoughts like “Bonkers never loved me!” she learned to say, “Oh look, there’s a pessimistic explanation.” This gave her enough space, enough mental distance, to at least consider a more optimistic story.

If you want to change your explanatory style, start by evaluating where you fall on the spectrum from pessimism to optimism. Researchers do this by analyzing the way people use the “three Ps” (personal, permanent, and pervasive elements) in their descriptions of past events. (You can use this quiz.) Unless your score shows you to be wildly optimistic, consider nudging yourself further toward the bright side.

Testing your explanatory style is the beginning of mindfulness, of watching the way your brain tells stories. Initially, you may simply notice that a thought seems negative; as you pay more attention, you will begin to see how you use the three Ps.

Once you’ve become aware of your explanatory style and its elements, make a concerted effort to describe positive events as personal, permanent, and pervasive. Tell the story of a bad event without personalizing it or thinking that it will have a broad, lasting impact on your life.

Staying the Course

The great thing about developing an optimistic explanatory style is that it’s self-reinforcing. It increases your hope and expectation that your whole health-and-fitness regimen, mental and physical, will be worth the effort. This frame of mind will help keep you not only happy but healthy; studies have linked it to improved immune function, better lung function, quicker recovery from heart surgery, and a lower risk of heart disease. I’ve also noticed that it correlates with my clients’ ability to achieve all their goals. Changing your thought diet—your way of thinking—may be the best thing you can do to stay on your food diet.

I suspect this is why Caroline, like many of my clients who successfully change their explanatory patterns, has experienced an unexpected side effect: She’s in the best shape of her life. She’s managed to drop a pattern of emotional eating, stay on an effective workout schedule, and lose five pounds. Even more dramatic are the changes in her posture and facial expression, which have gone from cringing and miserable to alert and interested, making her much more attractive and approachable. Not only does her mood improve every time she observes and alters a negative explanation rather than getting mired in it, but her body appears to love the change.

And I suggest that Caroline can expect this trend to continue. Is this an optimistic explanation? You bet. I’m sticking to my diet.