How to get along with anyone - including even a difficult subordinate

We cannot pick and choose who we work with. For team managers this rule is only half true as they often choose their own subordinates. Nonetheless, managers frequently find themselves in the situation of having to deal with people who are unpleasant or difficult to talk to, be they co-workers, supervisors, business partners, clients or sometimes even subordinates. How to deal with such people, de-escalate the situation and resolve everything effectively?