Accepting the fact that some people are just arseholes and it is no reflection on me. I used to worry that it was something I had or had not done that made them interact in the way they did.
Now I will initially give them the benefit of the doubt, (bad day, tired, hangover) but if it continues I no longer interact with them and move on. I no longer even consider or think about them.