Wow! You sound almost exactly like me when I was a senior in high school! It really does feel so awful to feel like your life is ruined before it even really began. I think the others gave you good advice about considering getting some professional help. But beyond that, I want to encourage you not to give up. Getting into the very top-tier universities is not the end-all-be-all.
I ended up going to a public university & joining its Honors Program. I had access to rigorous classes & was able to get books from Ivy League libraries to conduct for-credit independent study courses. Though I was offered the chance to publish some of my research, I wasn't interested, but a number of the other Honors students had one or more of their papers published in professional journals. Often internships are won by personal networking, so there is no reason you couldn't get a highly coveted internship even if you're going to a public school. And the combination of those two factors, along with demonstrated leadership ability should get you the opportunity to win a position at a prestigious organization upon graduation. Yes, some companies hold places specifically for graduates of certain universities, but that doesn't mean they won't hire highly qualified candidates from other schools. As an example, my brother works at a large tech firm. Though he too went to a public university because his HS grades were totally abysmal (seriously, he was accepted on a contingency only b/c of his ACT score), he got phenomenal internships. 5 years out of college, he now supervises a team of people that includes same-age peers who graduated from ivy league schools.
It is tough to learn to cope with when our plans don't work out as we hoped. The benefit, though, is that unforeseen challenges often arise in the corporate world and those who are exceptionally adept at managing organizational change & adapting project plans to work within a new set of parameters tend to be the fastest to rise to the top. It will be a question that almost every recruiter will ask you -- tell me about a time where something didn't work out as planned and describe how you handled that. Sure, it would've been nice if everything would have just gone perfectly (I struggle with that to this day), but finding a lesson to learn from this obstacle can end up giving you a huge advantage.
And if you still feel like you are at a horrible disadvantage going to a public university, you can work really hard & apply to get admitted as a transfer student to an ivy league school your sophomore or junior year.
wishing you well,