The mass shooting of children, teachers, the principal, and others at the Sandy Hook Elementary School in Newtown, Conn., has evoked strong emotions in Americans – a mix of anger, fear, and hopelessness. President Obama wiped away tears at a press conference as he expressed his own grief over the tragedy.

But one of the most common reactions may be this: How can we end this type of gun slaughter?

Mr. Obama alluded to this response in his remark: “We’re going to have to come together and take meaningful action to prevent more tragedies like this, regardless of the politics.”

Part of the answer lies in better security in institutions like schools, better detection of potential shooters, and a tightening of laws on gun ownership. Each person can take responsibility for ensuring more reliable protection of the innocent.

But beyond taking public action, the ultimate solution lies in each individual understanding that these shooters act out of the same anger, fear, and hopelessness that their violence evokes in us.

We cannot afford – as individuals or as a society – to keep mirroring their motivating angst.

The best antidote is to embrace the opposite of those thoughts and feelings. These include empathy, calmness, mercy, hope, and openness, all of which have as much substance to deter killings over time as do metal detectors in the moment.

Historians have documented a long decline in violence as societies have adopted the ideals and qualities that bring harmony in relationships. This does not mean simply being nice. It requires a commitment to seeking justice when someone has been wronged, being contrite when we have done wrong, and offering forgiveness to those who admit their wrongs.

Forgiveness may be the hardest. Yet it is effective in altering a person inclined to harm others out of revenge or hatred, and even to end cycles of revenge between entire peoples.

America saw a stunning example of forgiveness in 2006 after a gunman killed five Amish girls in Nickel Mines, Pa. The Amish families of those killed went to the home of the gunman’s widow with flowers, food, and hugs.

Obama’s comments after the Newtown killings reminded us what to embrace after a tragedy. The Newtown community, he said, “needs us to be at our best as Americans, and I will do everything in my power as president to help, because while nothing can fill the space of a lost child or loved one, all of us can extend a hand to those in need, to remind them that we are there for them, that we are praying for them, that the love they felt for those they lost endures not just in their memories, but also in ours.”