It is human nature to more readily register and think about negative stimuli than positive. Even when they are of equal intensity, the negative will have a greater effect on our psychological state and processing. We rarely ruminate for hours on a compliment. We commonly perseverate about criticism received, even from a stranger.
The effect works at a shallow level; a hurtful tweet will linger in the mind for longer than a congratulatory one. It also exists at a deep level; one can be traumatised by a significant life event more readily than transformed for the better.
It is not difficult to imagine the evolutionary benefits to a tendency to more keenly identify threats than pleasures. There are infinitely more ways to die than to stay alive - the world is a dangerous place. Any organism more sensitive to the myriad dangers would have more likely survived. We are descended from the paranoiacs.