Most people turn to their religion, or psychology.
Then there are the philosophers, and their texts.
I suppose there are support groups and get-togethers of various kinds.
And lastly, you can just, ask someone...
How do you deal with a friend who associates with some one you dislike/hate?
I'd say limit your exposure, if necessary, or study yourself, the other, and the relation...
I've heard it said, those of whom we abhor, often share qualities with us, we are unaware that we have.
I've had friends who are female, who hang with dudes who would probably be totally fine just watching me drown in a lake, as I represent nothing more than competition to them. And to the female friends in question, these dudes are probably prospective partners or have something to offer her, that isn't worth giving up on my account.
Side-stepping whether or not I should even find myself in such situations to begin with...
My relationship with dudes like this, being absolutely zero, is 100% defined by my relationship to the friend of which they too are friends. If I were to meet one of these people, neither of us being aware of having a common friend, it's likely, as decent people, we'd be decent to each other, and indifferent at worst.
Most of the time I find it difficult to believe the absurdity of human beings; because, they are so much like dogs and monkeys. They are so, 'territorial,' and, 'status defined.' We have collectively harnessed the power of the atom, yet we are not above territorial pissing contests, pettiness, selfishness, jealousy, intimidation, aggression, etc..
Knowing is half the battle. Some people aren't even aware of some crucial life lessons/skills/competencies they are deficient in. I'm sure there is much wisdom I lack; but, you make due with the best you've got, and endeavor to learn more...
It may be unfair, and in my appraisal, much more, disparaging, that not all of us get to grow up in the presence of wise mentors; but, I don't think that's the important thing to focus on. Unfairness can't exist without a mind to draw a comparison; so, unfairness is more of a state of mind, than a reality.
So what have I done, in such situations? I've just tried to tolerate it and endure it. Most of the time it's probably been my own fault for even putting up with it at all. In hindsight? I think tolerating and enduring probably has been the best thing to do, after all.