When faced with ill-natured people, we should think about the fact that in the past they failed to see the harmfulness of the disturbing emotions which now overwhelm them.
They became accustomed to gving them full rein and this familiarity has carried over into their present life. Nor can they have created much positive energy. All of this accounts for their unpleasant conduct.
If we are constantly surrounded by nice people who treat us well and by those that are in good health, we will lack the opportunity to increase our compassion.
Therefore, when such a rare opportunity presents itself, we recognize its value and cherish it.
In this way we use adverse circumstances to support our spiritual practice, which is a central theme of the instructions for training the mind.
People who are difficult to deal with offer us a precious chance to train ourselves to be loving, compasssionate and altruistic...That is why they are like a precious treasure.
When I see ill-natured people,
Overwhelmed by wrongdoing and pain
May I cherish them as something rare,
As though I had found a treasure trove.
From "Eight Verses for Training The mind" by Geshe Rinchen