Whether you want to stop eating that midnight snack or you want to stop talking to your ex once and for all, getting rid of bad habits can be tough.

It only takes one minute of weakness to talk yourself into a bad decision. The "just one cookie won't kill me" attitude is a slippery slope. Before you know it, you might find yourself indulging in the very thing you've worked so hard to resist.

As a psychotherapist, I help people identify strategies that boost their willpower and help them give up bad habits once and for all. And while there are many effective psychological tricks, these are three I like to use when I'm giving up a bad habit.

1. Develop a mantra.

When you're filled with self-doubt or your brain is tempting you to cave, it's hard to resist. Thinking "But it will taste good" or "I deserve to have this" makes it hard to stay strong.

One of the best ways to drown out those thoughts is to develop a mantra that you can repeat over and over again.

One woman I worked with was tempted to text her ex-boyfriend every time she felt sad or lonely. A quick text message conversation would temporarily relieve those feelings. But she knew their relationship was toxic and continuing to have contact with him was bad for her in the long-term.

So, every time she was tempted to message him, she'd repeat the words "self-respect" over and over again in her mind. It reminded her that she deserved to be treated better and that she could practice self-respect by not contacting him--and it worked.

Think of a quick word or phrase that you can repeat to yourself when you're tempted to indulge. You'll likely find it boosts your self-discipline fast.

2. Write a list of reasons why.

On a logical level, you know why you should give up a bad habit. Smoking is bad for your health and eating too much junk food is bad for your waistline.

But, when you give in to cravings, you aren't using logic. You're basing your decision on emotion.

You feel sad, bored, anxious, lonely, or some other uncomfortable emotion, and reaching for those unhealthy habits offers you temporary relief.

Improve your decision making--and resist the urge to give in--by balancing your emotions with logic. The best way to do that is by creating a written list of all the reasons why you shouldn't do something and all the ways you'll feel better if you don't give in.

I worked with a client who did this to help him resist eating unhealthy snacks while he watched TV at night. When he was tempted to go grab an unhealthy snack, he'd read over the list.

Looking at that paper that reminded him of things like "Eating junk food makes your pants tight" and "You'll be proud of yourself in the morning if you don't eat junk food" helped him resist most of the time.

The funny thing about cravings is that they usually go away if you wait a few minutes. So reading over your list--and tolerating a little discomfort--will help you ride the wave until the craving has passed.

3. Create obstacles.

Sometimes, bad habits are just too convenient. They're right there waiting for us to enjoy.

A simple but effective way to give them up is to make them harder to access. For some things, these seem obvious. If you are giving up alcohol, don't go to a bar. If you want to quit smoking, don't keep cigarettes in the house.

But what about other stuff? Sometimes, you have to get a little creative.

For example, I worked with a woman who wanted to stop eating so much sugar--something her husband had no desire to do. So they decided he would hide the cookies so she wouldn't know where they were.

Think about how you might create an obstacle for yourself. Whether it's an app that puts a time limit on your social media access or it's storing your credit card in the trunk of the car so you're less likely to make an impulse purchase online, you might find that accessing your habit isn't worth the effort.

You're only as good as your worst habits. When you give up something that's holding you back, your good habits become much more effective.

Mistakes are part of the process, however. So when you mess up, don't give up. Instead, look at it as an opportunity to grow stronger and become better.

Published on: Jul 31, 2019
The opinions expressed here by Inc.com columnists are their own, not those of Inc.com.