Like any living being, humans tend to focus on attaining security and minimizing danger. This propensity to distance ourselves from risk or, at the very least, our perception of it extends beyond our physical environment. As a social species, losing standing in relationships is psychologically akin to physical danger in our minds. By tracing the behavior down the ancestral line, we can isolate the catalyst behind why criticism and rejection elicit such a potent emotional response. In a tribal society, losing allies could be equivalent to death through the loss of protection or access to resources. Consequently, criticism sends our security-seeking brain into overdrive to correct our perceived missteps.
The greater potency of criticism isn't just a learned response; research suggests that there's an actual neurological bias our brains exhibit, placing more importance on negative stimuli, eg criticism. It's a very persistent bias. We've evolved to respond quickly and strongly to negative stimuli, and have dedicated brain regions like the amygdala, which encodes the emotional component (eg fear) of an experience so that it remains potent and we can rapidly learn from it.
When you live in the wild, "negative stimuli" can often mean "death", so the faster you learn from it, the better your chances of survival, ergo evolution would favour humans who dwell on the negatives. And our brains may be a lot more sophisticated nowadays, but criticism is still a negative stimulus, and millions of years of evolution can't be switched off easily.
Positive things happening to us make an impression too, but it's less common that "a nice thing = lethal", so it's not such a selective pressure.
The sting of criticism wouldn't be so problematic if praise provided an equal emotional high, but sadly, that's not the case. More often than not, praise's feelings evaporate faster than criticism's pain. As it turns out, there are various reasons for this phenomenon, but while understanding why criticism wounds the ego is interesting, it's hardly applicable information. It's more important to know how to deal with criticism healthily. In the video linked below, Malcolm Gladwell explains his technique for dealing with criticism.
If that doesn't work, you could always just internalize everything, positive or negative, as fuel to prove people wrong, like Michael Jordan. The former is way healthier, but the latter is more fun. Choose wisely, folks.