Keep Your Cool In Any Situation
"The sign of an intelligent person is their ability to control emotions by the application of reason.."
-- a quote I heard somewhere, sometime...
In all cases, when you are dealing with your harasser, keep your cool and be aware of your surroundings. Unless there is a life threatening or serious physical assault, do not strike back, rather, look for witnesses as you are being yelled at, grabbed on to or having your path blocked.
This will pay off for you later on, plus, if they are not physically threatening, you are not in any real immediate danger, then they are simply being a pain in the ass, so don't risk your case by a knee-jerk reaction swing at them and risk your own physical assault charge.
Admittedly, this can be incredibly difficult. My wife managed it in one situation, and as it turns out a witness that was willing to get involved, saw the whole thing and it completely solidified our case in that one single instance. As that single instance resulted in a criminal charge. With a criminal charge on record, you have a court record of harassment against you, and once the person pleads guilty, or is found guilty, that sticks and is in your favor and virtually proves the case for you. If my wife would have swung back and a fight ensued it would have been a different story.
If you find yourself angry at this person, and you let this person dictate your actions, such as not going someplace because they'll be there or that sort of thing, you are giving them power over you. While them having such power over you, is able to be proven it can help you in the courtroom, it can make your life harder.
The better use of time and energy is simply find the strength to laugh it off and be glad it's not worse. Forgive them, pity them, and move on.