You can train your mind to be unhappy and you can train it to be happy.

Training your mind to look for errors and problems (as happens in careers like accounting and law) can lead you toward a pervasive pessimism that carries over into your personal life.

Via One Day University Presents: Positive Psychology: The Science of Happiness (Harvard’s Most Popular Course):

I discovered the tax auditors who are the most successful sometimes are the ones that for eight to 14 hours a day were looking at tax forms, looking for mistakes and errors. This makes them very good at their job, but when they started leading their teams or they went home to their spouse at night, they would be seeing all the lists of mistakes and errors that were around them. Two of them told me they came home with a list of the errors and mistakes that their wife was making.

Why are lawyers 3.6 times more likely to suffer from depression and more likely to end up divorced?

Martin Seligman, psychology professor at UPenn and author of Authentic Happiness, explains they have trained their minds to seek out the bad in life because pessimists excel at law:

Pessimism is seen as a plus among lawyers, because seeing troubles as pervasive and permanent is a component of what the law profession deems prudence. A prudent perspective enables a good lawyer to see every conceivable snare and catastrophe that might occur in any transaction. The ability to anticipate the whole range of problems and betrayals that non-lawyers are blind to is highly adaptive for the practicing lawyer who can, by so doing, help his clients defend against these far-fetched eventualities. If you don’t have this prudence to begin with, law school will seek to teach it to you. Unfortunately, though, a trait that makes you good at your profession does not always make you a happy human being.

Is there a way to get your mind out of these negative loops? Yes.

Here’s how.

Three Blessings

You must teach your brain to seek out the good things in life. Research shows merely listing three things you are thankful for each day can make a big difference.

Via Flourish: A Visionary New Understanding of Happiness and Well-being:

Every night for the next week, set aside ten minutes before you go to sleep. Write down three things that went well today and why they went well. You may use a journal or your computer to write about the events, but it is important that you have a physical record of what you wrote. The three things need not be earthshaking in importance (“My husband picked up my favorite ice cream for dessert on the way home from work today”), but they can be important (“My sister just gave birth to a healthy baby boy”). Next to each positive event, answer the question “Why did this happen?”

This technique has been proven again and again and again. One of the reasons old people are happier is because they remember the good and forget the bad.

Social Comparison

People probably encourage you to not compare yourself to others. Research shows it’s not necessarily harmful — but only compare yourself to those worse off than you:

“Generally if people compare themselves to those who are worse off, they’re going to feel better,” continues Bauer, now a research associate at the Sunnybrook Health Sciences Centre and a clinical psychologist at Cognitive Behavioural Therapy Associates of Toronto. “When they compare themselves to people who are better off, it can make them feel worse.”

Tell Yourself the Right Stories

When your vision of your life story is inadequate, depression can result. Psychotherapists actually help “rewrite” that story and this process is as, if not more, effective than medication.

Via The Storytelling Animal: How Stories Make Us Human:

According to the psychologist Michele Crossley, depression frequently stems from an “incoherent story,” an “inadequate narrative account of oneself,” or “a life story gone awry.” Psychotherapy helps unhappy people set their life stories straight; it literally gives them a story they can live with. And it works.

“Retrospective judgment” means reevaluating events and putting a positive spin on them. Naturally happy people do it automatically, but it’s something you can teach yourself.

Via Happiness: Unlocking the Mysteries of Psychological Wealth:

Lyubomirsky showed that happy people naturally reinterpret events so that they preserve their self-esteem.

Timothy Wilson, author of Redirect: The Surprising New Science of Psychological Change, has talked about how the process of “story-editing” can help us improve our lives:

…we prompted students to reinterpret their academic problems from a belief that they couldn’t cut it in college to the view that they simply needed to learn the ropes. The students who got this prompt—compared to a control group that didn’t—got better grades the next year and were less likely to drop out.

And when it comes to the future, be optimistic. Optimism can make you happier.

So, to sum up:

Count your blessings Only compare yourself to those worse off than you Tell yourself a positive story about the challenges in your life

What else can make you happier? The things proven to help are here.

This piece originally appeared on Barking Up the Wrong Tree.

Join 25K+ readers. Get a free weekly update via email here.

Related posts:

Can one word sum up everything you need to do to be happier?

What 10 things should you do every day to improve your life?

Here are the things that are proven to make you happier

Contact us at letters@time.com.