The thing is, people have their own issues and their reactions to you are not just, and sometimes hardly at all, much about anything that you personally said or did. So, it’s often not really so much about you as about them. So it’s helpful is to realize, as Laura Huxley put it, that, so read the book, it’s free.
In addition, with that understanding, you can more easily have compassion toward the personal problems that they are struggling with when they happened to bump up against you—what horrors they may have gone through to get where they are, you do not know. So people are just being what they are and, “To become indignant at their conduct is as foolish as to be angry with a stone because it rolls into your path.” (Schopenhauer). Finally, remember that we are all weak at times and that, “There, but for the grace of God, go I.”