I’m a jealous person. I don’t try to be. But it’s there.

Why? I don’t know. I certainly don’t get anything out of it. As Joseph Epstein wrote, “of the seven deadly sins, only envy is no fun at all.”

Envy eats at me. Even if you’ve been successful—in fact often more so when you’re successful—you’ll still look around at other people and think: “How did they get that?”, “Why don’t I have that?” And then you’re unhappy or resentful or worse, you wish ill on other people.

I wish that I didn’t think those nasty, entitled thoughts. Who does? I find it to be even more embarrassing because when I really think about it, I have pretty much everything I want. But envy follows me like a shadow, as it does for a lot of people.

Last week I was having dinner with James Altucher and we spent a lot of time talking about jealousy. He said he struggles with it too. He asked me what I do about it. I shared an exercise I came up with.

I’ll quote him paraphrasing me, since he put it in better words than I actually did when I tried to explain my thinking.

If you are envious of someone, you can’t just pick one or two things about them. Because it’s their entire history that has got them the one thing you are envious about. So, he said, PICTURE THAT YOU CAN CHANGE PLACES IN EVERY WAY WITH THEM. But then it’s forever. He said: Would you do it?

This works because the answer is usually no. The jealousy is real but the logic behind it won’t stand up. I’ve found that this exercise helped me make progress in eradicating the selfish, toxic taste of jealousy and envy (not just for me, but also for people I’ve passed it to). When I feel it coming on, I don’t just accept the emotion as it is, I take it—as Epictetus wisely advises—and say, “Hold on a moment; let me see who you are and what you represent. Let me put you to the test.”

For instance, let’s say I was feeling jealous towards another author (and every author will admit to do this at one time or another). First, I’d want to think about why. Maybe it’s because they’ve sold a lot more copies than me or their books have gotten more attention. Well, aren’t their books a very different style than yours? Yes. Well, why don’t you write in that style? Are you not capable of doing that? No, I am. I choose not to because I don’t like that style. It’s not what I want to do creatively. OK, well then isn’t it a bit entitled to think you can make that choice and still get the exact same results?

And putting that all aside for a second, do you actually want that person’s life? Do you want to be the person that went into making those books? Do you want to be on the road all the time like that? Do you want to have to be in the space they’re in? Not at all! Don’t you like what you have? Don’t you like who you are? Of course. I feel great. Alright, well ask yourself if it’d be worth trading your life for theirs.

What James and I started doing at dinner was run through people we had felt pangs of jealousy towards, either personally or professionally. He’d name someone whose work he admired and then I’d point out that the guy had a gambling problem. I named someone who was a well-paid speaker and investor and James told me that the dude cheated on his wife a lot. James picked someone who has a great reputation and has won a lot of awards. I pointed out that despite being a critical darling, the person’s work hadn’t sold well and actually the author was quite frustrated about that. I mentioned a woman whose work I was a big fan of and then I remembered how many people had told me that she was controlling and mean. We talked about a really successful businessman and then we realized that the guy hated his business and talked about wanting to do something else all the time.

What’s left after you run through this exercise is a couple things. First, you’re reminded that nothing is as clean and simple as you think. Jealousy makes another person’s situation rosier than it is. Second, it’s clear that a lot of what we covet comes at a cost. Often, we’re aware of this cost (which is why we haven’t pursued it already) and seeing the way that the cost has played out on the people we’re envious of is a good reminder. Third, we’re able to see something we often miss: that we have it pretty good and even though our eyes may wander, in fact, if forced to choose, we’d stay put.

There is another part of envy that I think we missed—something that has helped me more philosophically than practically. We forget that it can be a two way street. From the outside, we see how well someone might be doing or what awesome stuff they have and all we think is: I want that. We don’t think: “Do they like what they have?” We don’t think about what they want.

There is a sad story I write in Ego is the Enemy about one of my heroes, Ulysses S. Grant. After his dysfunctional presidency, Grant partnered with his son and a dishonest investor named Ferdinand Ward to create a Wall Street brokerage. Grant bankrupted himself in the pursuit of riches he didn’t even need. His friend General Sherman noted the unfortunate irony—Grant had lost everything in an attempt to “rival the millionaires, who would have given their all to have won any of his battles.”

All Grant could think about was what other people had and in the process lost sight of how much more impressive what he already had was—comically so. There are lots of millionaires. Most of them are forgettable. There are very few Ulysses S. Grants. Yet he wrecked his life—wasted the golden years of his life—thinking if only I could be more like them.

I’ve done this. You’ve done this. We’ve tried to chase what other people have, we’ve felt inferior because we don’t have it. Have we ever stopped to think: “Are those people happy with what they have?”, “What if what I have is better?”, “Could they actually be jealous of me?”

Or maybe neither of you have it right! There’s a scene in one of my favorite Lawrence Block novels, Grifter’s Game, where Joe Marlin is having an affair with a beautiful woman. Then he thinks of her going back to her husband and gets angry and envious. And then he realizes, oh wait, if the husband ever found out about the affair, he’d be justifiably angry and envious too. “It always works that way,” he says. Though really they could both benefit to question why they are with this awful woman in the first place. In fact, she’s manipulating both of them, using that envy to her own advantage. Neither realizes the truth until it’s far too late.

I can’t say that this exercise is flawless or that it magically cured me of my jealousy. It’s not supposed to. It’s an exercise—a tool to use when envy appears. Do I have to use it more than I like? Absolutely. But it’s far better than being under envy’s delusive, destructive sway.

And there’s one other benefit of running through this process—of walking through whether you’d trade what you have for some random thing that’s turned you green with jealousy: Appreciation. Gratitude. You have it good—better than you know. It’s only when you forget that, that you begin to covet. But when you remember, when you understand the true value of all that you possess—and realize even that people might actually resent you for it—that’s when happiness and contentment are possible.