One of the best pieces of guidance I ever received was from a very unconventional sales trainer, Steve McKown. During a training session the group were collectively bitching about some of the 'jerks' they had to deal with. Partly into the slagfest, Steve called a halt, pointed to the group and said "This is bullshit. You (finger pointed around the room) are 100% responsible for the relationships in your life! If you need that relationship, you must make it work for you. If not, move on."
It's been 25 years since I heard that message and it has served me well in more situations than I can count.
The key elements of my strategy?
1. Investigate whether your opinion of someone is informed by the difference between intent their intent and your perception. Sometimes a simple request for clarification is all that is needed to get on the same page as another person.
2. Use Habit #5 - seek first to understand before being understood. Related to element #1, rather than judging and reacting to the other person, get curious. Ask questions that will give you a sense of where they are coming from and what outcome(s) they are hoping for. Often, this will lead to them reframing their interaction so that it becomes more clear and aligned with how you hope to receive the communication.
3. All behaviour comes from unmet needs. If another person behaves in a way that is difficult to accept and the first two elements aren't appropriate, explore the idea that underneath the objectionable behaviour, something uncomfortable is going on. In my experience, people are not mean and disrespectful because they want to. Such behaviours are almost always a sign that the person is suffering in some way.
While it's unrealistic to think you can alleviate their suffering, you can always generate your own compassionate thoughts about them and in your own way, wish them peace and freedom from suffering. What many people fail to realize is the direct connection between your compassionate behaviour and your happiness.
If this doesn't work or is not a practical option, you always have the choice to end the relationship.