I believe it's in "The Dhammapada" that Gotama the Buddha states that hatred isn't overcome by more hatred but by love. In Vipassana meditation, it's characteristic to end the sitting with a few minutes of metta bhavana meditation, wishing all beings to be happy, equanimous and free from suffering. It is also the point of the four immeasurables in Mahayana Buddhism that all beings have happiness, are free from suffering, imbued with joy that has no limits and abide in equanimity.
This is where the basis of my thinking lies today; in the innate goodwill and compassion that I've seen expressed, the truest manifestation of what humanity is.
Lastly, Robert Fripp has what I consider one of the finest articulations of how to navigate through events like yesterday's:
"In strange and uncertain times - such as those we are living in - sometimes a reasonable person might despair. But hope is unreasonable and love is greater even than this."