Svāmī Piḷḷai Lokācārya in his magnum opus Śrī-vacana-bhūṣaṇam writes a beautiful sūtra teaching five ways of responding to transgression.
Patience, compassion, smile, acceptance and gratitude must be responses to transgressions. 
If a person harms us or abuses us, adopts mental, verbal or physical violence, the first and most important thing to do is to not reciprocate. The root cause of all suffering in the world is impulsive or calculated reciprocation of harm. By responding with violence, we join the transgressor in the act of transgression. The transgressor has won over a convert so that the force of violence would thrive in one form or the other. To avoid this from happening, we must learn to see what is happening and understand it deeply. For this we need patience.
Patience creates understanding that allows us to relate to the source of violence which is usually a deep sense of emptiness or some form of pain. When we realize the harmful effects of pain and the suffering it creates in the individual, it allows cultivation of compassion towards the transgressor. We also understand the pain that would be endured in future as a result of this transgression. Compassion arrests the process of creating more pain and opens our understanding to more useful solutions.
There is no weapon more potent than a smile. Smiling communicates inner compassion and understanding. It advertises to the transgressor what our response is to violence. Violent people lose their ability to understand and relate to feelings of others. They are numbed with negative emotions. Smiling makes our inner state of mind explicit as it is very visible. When we see ourselves in others and acknowledge violence as a common disease, we smile out of compassion. We smile out of the understanding that the ego is throwing a tantrum without allowing the person to know oneself.
The fourth response is acceptance. In order to respond effectively, we need to accept the situation peacefully. Allowing the transgression passively is dangerous and a response is necessary. But, this response must not take the form of fighting. It should not create a condition of conflict where the transgressor goes on the defensive and enters deeper into darkness. Acceptance is the art of bringing what is hiding in the darkness to light and allowing for redemption.
Acts of transgression also allow us the opportunity for gratitude. The problems of the human condition hide in darkness and make us commit acts of extreme violence without feeling. When the same act of transgression is committed against us, we suffer. That suffering provides us the opportunity to see the problem in ourselves. It awakens us to the adverse effects of our own actions that we did not notice because we did not suffer their consequences. Response is not always in the form of changing something or someone outside. A response to transgression is complete only when there is inner transformation. One comes out of the suffering with greater understanding and a renewed strength to handle such transgressions. We uplift more of ourselves from darkness to light.
Obviously, there is no instant panacea for all of our problems and the above mantra may not lead to quick success or victory over the situaiton. This does not justify acts that nurture conflict and violence. The only hope for humanity, in the long run, lies in responding with understanding. The transformation that follows may be slow but it is the only way transformation is possible. The slow nature of transformation also provides a scope for deep understanding of the human condition and creates the opportunity for spiritual innovation. Note that the sūtra above does not define what the exact response should be, but only mentions the values that shape the response. Defining the exact form of response would hamper understanding. One would ignore what the situation is and go ahead with a preconceived response; if you have a hammer, everything looks like a nail. Our urge to live in a simple world that divides neatly into good and bad is the source of most suffering. The world is complex and throws up complicated situations. It demands that we are heedful and understand. The world draws forth our creativity in arriving at novel responses. And in this, lies our true beauty.