As a guy who has also fallen from grace, several times, with heavy reality checks i would say that this is a normal reaction of coping in front of what is your first big reality check:

- The end of school for a guy who was "one of the best" and with it: the loss of an academic status (grades) that has little to no impact on the real world ("genius" excepted), the loss of a clear path to success (study hard and it is going to be fine), a set of guidelines (everybody is equal and graded on their knowledge).

- The first time somebody told you that not everyone will want to work with you. And with it the realisation that not everything works as you were led to believe, you are good at what you do, why would they let you go? If you were really that good why wouldn't they keep you and do everything they could to keep you?

- Go back to father and mother, bearing this first failure, and feeling they do not completely understand.

Of course you might not think of it in those terms, but it is the reality most people, even very bright people, face after college. And in my opinion there is a great lot to be grieving about. Those are just the first realisations that will come to pass in your life about how the world is brutal and do not follow any rules you think it should follow.

You also are at a disadvantage, because you did good in school, you never had to defend yourself despite your own self-image, to fend for yourself and see the good in yourself despite the flaws. Less successful students will have learn this by now, and they are prepared to fight for their share, to promote their knowledge, to put forth their projects with affected self-confidence. That is a skillset you need to learn right now.
In my opinion there is a positive way of learning it, and a very bad way of learning it. And it all comes down to how you will frame this reality, the negative way will frame this need to fight and sell yourself as a cheat, a crack in the logic, something that would make sense only for less gifted people. This model, in my opinion, couldn't be farther from the truth, it is the way of the academic and technocratic ego, that would only work for you if you were truly narcissistic. You need to let go of what was given to you in terms of status and make it your duty to build it for yourself. You should be the one creating your own status, not others.

As a Psychiatrist I would say:
Since depression should occur without clear external factor, this is not a major depressive disorder, nor a minor episode, in my opinion it is a form a grief, a syndrome now called bereavement.

Of course you will see grief generally associated to the death of someone, but rarely in modern psychiatry will you see it come up when it is something inside you that died. You will see that kind of concepts, such as narcissistic collapse, in psychoanalysis, psychodynamics or other more holistic psychopathological framework. But maybe HN is not the place to go on about those.

When I am reading you, and I am not the only one to notice here in the comments, I can see a certain dynamism hidden below the apparent depression, you seek and imagine a future. A positive future in accord to your previous expectations. This is largely in favor of grief. Indeed, the main difference between grief and major depressive disorder is this fluidity, this motion of affects and thoughts that are able to go beyond the current state into a more positive future. You are also actively trying to find solutions for yourself, trying to find limits to your symptoms, they are submerging you, you can think about them, and think about yourself relatively clearly, that is another strong cue that you will get over this, and end up stronger than you were before.

The 5 stages of grief are something we use in practice but it rarely has this exact form of denial, anger, bargain, depression, acceptance. Usually you go through fast cycles of anger, despair, fatigue, hope, discouragement. Mostly discouragement and fatigue.

My advice will echo other people's comments, you should set up a healthy daily routine, which seems fairly simple but always holds in itself the secret to a fast recovery. Set even the smallest of positive healthy goal. That simple act is in itself the fastest path to resilience by changing how you frame your relationship with your mental state.

- Most important is sleep. Do sleep at regular hours, before midnight, without your computer in bed, wake up early after your natural number of hours of sleep. If you think you need more than 8 hours, try sleeping at 11pm with blinds slightly open to let the morning light wake you before your alarm.

- Do sports, even if only a little yogi sun salute or couple pushups in the morning (cardio would be best but hard especially in the winter !)

- Schedule todos and positive habits: download an app like Habitica or something, and plan your days.

- If you are not doing anything of your days, either start a side project, enroll in a class, or do something creative like cooking for example, or music.

- Read 15 pages per day minimum of non tech-related book, maybe philosophy, or a author you like.

- And set a mental date as to when you will stop looking and accept one of the offer. Settling for an offer that you are not 100% sure about, do not settle for one that would make your daily life a nightmare, like going someplace you know nobody and/or commute 2hours a days. Find someplace life is easy, so you can enjoy your daily life.

- Do see your friends, be honest with them, don't hide, have a drink, play some videogames, catch a movie.

- Take a real good care of your environment, make it something sweet, kind, light, fun. Cherish friends, and family when they are a positive force in your life, do not linger to long otherwise. A positive environment, is 90% of the work for a happy life.

On a more general note, there is usually no cure to mental illness, but the realisation that there is no cure except your own will to understand yourself, cope and do the best with what you have. Then the disease usually slowly disappears, controlled out of sight.
I do not mean it in a bad way, taking back the reign of your own sanity is the real cure, this realisation do not come easy, nor is it possible for every type of illness, or every environment.
This is my opinion, from having worked in the field for some years now, having also my own issues and close friends suffering from all kind of mental problems.

That's it for my two cents !

I might be mistaken but I honestly believe you'll be fine, and do not think you will drag this all your life. This will make you stronger, without any doubt in my mind.