I'm going to disagree with a lot of other commenters: In my experience, a top-notch education is enormously valuable, and where you go to school very much matters.
I applied for grad schools in math, my first choice was MIT. I was very disappointed to be rejected. My second choice was Michigan, and I was very disappointed to be rejected there too. My third choice was Stanford. Rejected.
My fourth choice was Wisconsin. I went there and it was an AWESOME experience. They gave me as much as I could handle, and prepared me very well for the road ahead.
I will disagree with other commenters and say that it is not "all for the best". It probably would have been better if you got into Harvard. You really did lose something, and you would be dishonest to yourself to pretend otherwise.
But Plans B and C and D and E and F are also really incredible. I had the amazing fortune to get a three year postdoc at Stanford (a "postdoc" is a short-term job you can get right after you get a Ph.D.) and worked with some of the best mathematicians in the world. Stanford is a top-notch place. Apply there.
Apply to MIT. Caltech. Princeton. Rice. Brown. Harvey Mudd. Deep Springs. Apply to the state school in your state. State schools vary highly in quality, but some of them (Michigan, Wisconsin, Berkeley, UNC, and others) are really top notch.
Apply to any school that piques your interest. Or, consider doing something else for a year before returning to school, if that's your cup of tea.
You still should be selective and aim as high as you can, but know there are a huge number of wonderful universities out there offering mind-blowing educations.
If you're prepared for periodic disappointments, then you need fear nothing and the world is yours! There are so many opportunities out there which are still available to you. What an awesome fact to contemplate. I wish you good luck.