It is true that sometimes, you may harm someone while trying to help him. This may be due to your inability to understand a situation or a person or yourself correctly. You may not have much control over this, but harming someone intentionally is something totally different and avoidable.
Terrorists or other such elements may want to harm even innocent people to create panic or show their might. But what about people like you and me? Why do we harm somebody?
Common people harm others primarily to take revenge. They may have some real or imaginary sense of injustice or hurt which prompts them to return in the same coin. Like, if someone has thrown a stone at you, you will like to do the same to him to settle the score. But before proceeding to take your revenge, you may do some introspection to objectively come to the conclusion whether the other person had the intention to harm and whether it was your own doing which led the other person to act in the manner he did. In most cases, such introspection will put an end to the urge to retaliate.
If the introspection leads you to the conclusion that what the other person did was unjustified and unprovoked, you may still try and give him the benefit of doubt. Maybe, he had a nasty fight with his wife or maybe, he was facing an acute personal or financial problem. If you can intensely imagine that the other person indeed was in such a situation, you may be filled with sympathy rather than the urge to harm.
If this also does not work, maybe you can remind yourself that forgiveness is the weapon of the brave. Forget and forgive for your own sake and for the sake of the other person. Inability to forgive will rob you of your peace of mind and lead to an ugly chain reaction. If you do not retaliate, may be sooner or later, the other person will realize his mistake and seek your forgiveness. Who knows, you may be able to crack a tough nut- for good.