You are not hopeless not by a long way but you are stuck in a rut. You are stuck in a style of thinking that will be your downfall.
Somehow we need to get you to evaluate and look at your life so far in a different light. If you don't you will be forever stuck in your own head in a world of pain.
You recognise you are unhappy that is the first step. If you have been like this for some time go and get some medical advice. If you can change the way you think to a new positive dialogue in your head you will feel so much more optimistic. Sometimes talking therapies can help here. If you need medication to help you through this moment in time take it. You need to end this continual misery.
Write a letter expressing all the emotions you feel and why and address it to the person with whom you broke up. When you have finished read it out aloud. That relationship wasn't meant to be so sever the ties and move on now you have reviewed it. If you have found someone you feel is so compatible, so wonderful, so lovely then you will find someone else who also fits the criteria. Chasing after someone who has basically said speak to the hand is a complete waste of time. You could have found someone equally as lovely by now? Why are you hanging on? Is it in the forlorn hope they might change their mind and then everything will be lovely once again? The reality pill might be a better pill to swallow? Visualise turning a page to end a chapter. You can never go back on this chapter so leave it alone and start turning the pages of a new chapter you are about to write.
If you got rejected from University two years running - maybe Uni isn't for you? Look at your grades, your personal statement. have someone read your personal statement and decide how negative is it or where it needs changing? Turn this on its head. You have saved yourself £30 to £50K of debt. Decide what other options you have not going to Uni and actively search them out? Even if you max out your cramming to survive exams and don't get into Uni you will still have tried to get the best marks for your subjects in the short time available.
If you are getting stressed or anxious on the approach to exams - every one does. It is how you cope that matters probably more than anything because you will need this coping mechanism in the workplace. If you have done your best you can't do anymore. Close your eyes, breath very deeply for a few minutes and just visualise yourself succeeding, anywhere you want to be that is good and a nice place to be. Take your time. Then open your eyes and just make a plan to look at which exams are first, second etc. Plan a timetable to learn just 5 key facts of the next up and coming exam. Something small but doable. That's it. Just do your best, nothing more. If it is meant to be it will all work out. If it doesn't have a time of reflection to chew over the good, the bad, the ugly. You will learn more about yourself by how you cope with this and any failure which you can then use to good effect.
Prioritise sleep, good food (not processed rubbish) and exercise. Empty your head of clutter and focus on one small thing you want to change or do.
Hope it all goes well where ever you end up