How do I deal with this kind of rejection?

You are not alone- my DD with SAT of 1550 and 45/45 IB and great ECs thought Swat would be a perfect fit. She was rejected. It was a big surprise. Luckily she had s balanced list and has some good admissions already.

From where I’m sitting it does look like a crap shoot. I hope you have applied to a number of less selective colleges as well. You will find your tribe anyplace you end up!