Ah depression. I've been there too and I can remember the first time something challenged me after coming off the medication I was sure that I was going to sink right back to that dark place again. Turns out it didn't happen, I coped and moved through it. Breathe and take one day at a time. Now you know what depression is like you're more likely to be able to catch it in the early stages.
You're 2 years out from that place now, so far you've been coping. Chances are that you can cope with this too. If you need to take a breather from the whole relationship situation for a few days and refocus on your school work. I know that for me at least stress is a major contributor to my emotional instability. If you can get on top of the school work the relationship stuff might not seem quite so monumentous.
You're right that in 5 year (regardless of the outcome) what's happening now won't seem like it was such a big deal. In 5 years you'll have a whole new set of things going on. Life never stops throwing those lessons at you. All you can do is to do the best you can with the skills you have. Do you have someone you can talk to who isn't involved in this situation? An outside perspective to unload on can be a big help.
Everything will be ok in the end. If it's not ok it's not the end.