Several years ago, I had a customer who would glower at me as soon as I entered his department. He would say, ‘Fix it right this time, or get it out of here,’ no matter what the problem was.

If I was even one minute later than my ETA, he would be on the phone with my boss, complaining about the horrible service he was getting.

Because he would place a service call for the slightest imperfection or hiccup of the machine, I was going there almost every day.

Eventually, my manager spoke with his boss and he was moved to a different department, but not before I learned a few valuable techniques for dealing with a difficult person in the workplace.

So, here are my top tips.

Be careful how you react

In his Psychology Today blog, Ten Keys to Handling Unreasonable & Difficult People, Preston Ni’s first tip for dealing with difficult people is to keep your cool.

Getting angry is a natural reaction to being mistreated by another individual, but giving in to the anger will only make matters worse.

Losing it with a customer or even a coworker can be grounds for termination. It’s much better to take a step back and look at the situation with the proper perspective.

Ni suggests silently counting to ten before you speak. Most often, that’ll be long enough to let the pot go from full boil to a frothing simmer. But, there will be situations when counting to 100 will not be a long enough cool-down. For these times, I suggest a white lie. An urgent text from a spouse or a sudden need to use the restroom are great ways to gather yourself before you make a fool of yourself.

Rise above the fray with the proper perspective

Ni’s second tip is to fly like an eagle. ‘Some people in our lives are simply not worth tussling with,’ he says.

In other words, there are those who will treat you like trash no matter how well you treat them.

It’s best to keep the perspective that you have to interact with those people for the sake of your job, but you owe them nothing more than what is required. And, once that’s finished, you’re free to leave – as quickly as you can.

Don’t take it personally

Like most service technicians I’ve worked with, I take a lot of pride in my ability to repair machines and make customers happy.

When I took over Mr. Complains-a-lot’s machine, I had heard from others that there would be no pleasing him. I took that as a challenge.

I tried my best to make him happy, but my customer-centric efforts made no difference; he still growled at me as soon as I walked through the door.

At first, it got me down and made me question my abilities as a service technician – but then I came to the realization that it was him and not me. I found out later that he was miserable in his job and was trying to move to a different department – at my expense.

When you’ve tried everything with no results, blame the person, not yourself.

Hold no grudges and put away the revenge plan

I had a coworker who had it out for me (for a reason I’ve never uncovered).

He would speak badly about me to my manager, my coworkers, and even our customers. He also altered metrics we used so that my service calls wouldn’t meet standards.

When I discovered all that he had done, I went to our HR department with proof of how he’d wronged me. He was disciplined and put on probation… but that wasn’t enough for me.

It’d been going on for a long time before I discovered it and I wanted him to pay – dearly. I started scheming ways to pay him back, which only made my loathing of him more intense.

Before long, I was consumed with hate to the point that I was miserable at work. But once I realized what was happening to my heart, I decided to forgive him and let HR take over my ‘payback’. It was one of the most freeing things I’ve ever done.

We were never friends, but I learned how to work with him without hating every moment (but still with one eye watching my back).

Difficult people will always come and go in our lives, but it’s how we think and react that will keep them from ruining our day.