Best to accept it. Denial or avoidance makes it worse, at least in my experience. I'd be defensive and play the blame game. I only experienced some level of peace, when I faced it, acknowledged the hurt, fear, and accepted it. I also had to learn that someone rejecting me didn't mean I had done something wrong or was at fault. Maybe something just wasn't a good fit. Maybe no one was responsible, even if it was many against one. At the end, realize you're a separate person from everyone else, and it won't phase you as much. You'll come to tolerate it, and deal with it.
It can also help realize some truths about ourselves, some issues we may have that we haven't faced head on, and so rejection helps us recognize that something in us needs to change. That's the hardest rejection to handle, one that has us realizing a hard truth about ourselves, flaws or faults we ignored and didn't want to face. Of course, it hurts worse when it's harshly given.
A little compassion would probably soften the blow.