Congratulations on writing that essay! Respect is due!!!! I remember writing essays when I was at university, so be proud of yourself that you completed a good piece of work and handed it in. That is a real piece of progress in living your life and moving towards your college qualification. ( In a spirit of strict historical accuracy, I have to admit that not EVERY one of my university essays was handed in on time...

)
Also, as a singleton myself, in what sometimes can feel like a world of couples and families, I really can appreciate the whole " feeling like a third wheel " thing, and you did handle it well. For depressives like us handling what can feel like a rather delicate " social moment " like that can take quite a lot of emotional energy. At least it does for me. So, handling such a situation with the poise that you did is another good bit of progress. ( I find I have to think quite a lot about such things sometimes. Eg: I don't want to be a gooseberry, but I don't want to seem unfriendly, etc...) I know that I need to be among people, but sometimes I have to rather " work " at what, I hope, seems casual, even confident, social interactions.
I can also understand your feelings of feeling " swept away " by feelings of depression, loneliness and your world suddenly darkening. To tell the truth, my day has left me feeling rather that way myself.
However, I'm trying to rein in " and " reframe " my feelings, as best I can. I think of it a bit like being a sea vessel swept before a sudden squall at sea. It may feel that my ship is being blown helplessy off course, but I can lower an anchor, ( Concentrate on something positive perhaps, a happy memory, or something to look forward, however small, just to have something good to distact myself with. Eg: I'm looking forward to seeing a new episode of the Mentalist, season two tonight, Ah.....Agent Lisburn...... Sighs, longingly......!

)
Or, I can turn into the wind, acknowledging how bad I feel, but knowing that the world ISN'T as BAD as I FEEL. Knowing, from experience that my mood can go UP as well as down, and something is bound to pleasantly and productively distract myself from feeling low in the, hopefully not too distant, future.
Also, please remember, ( Note so self to remember this too!

), however, bad your day may be now, however bad you may feel now, that DOES NOT invalidate all the progress you HAVE made in your day.
Eg: your essay is just as good when you're feeling low, as it was when you were perhaps feeling more positive.
Sometimes our lives are going to feel like " two steps forward, one step back ". BUT, however, frightening, lonely and depressing that " one step backwards " may be, it is STILL only one step backwards, and even subtracted from two steps forward, you're still one step forward towards wherever it is that you're going, than you were.
" Hopes may be dupes, but fears can be liars ", in the words of the poet. I find that sometimes I have to guard against the illusion, ( An illusion perhaps particularly strong in depressives? ), that my negative feelings are more " real " than my " positive " ones, that my " backsliding " is more " real " than my " progress ". I tell myself that that ISN'T TRUE.
A bad day doesn't wipe out or " invalidate " the progress made on a good day, a bad day doesn't mean that tomorrow can't be a good day. For you, me, hopefully all of us.
( OK, OK, enough preaching from me. For one day anyway.......!

)