Try to have understanding and compassion with that person. Realize their actions usually have nothing to do with you. Perhaps they are going through a difficult time. We never know what is going on in others lives. This is hard to do and will take practice. Try smiling and moving on directly after this happens. I hope this helps.