There are a couple of broad questions here.
The first relates to the logistics of continuing with your study.
Putting L4 aside, as you have successfully completed that under what were some challenging circumstances - so well done on that.
As to L5, has the exam board met and issued you with a results letter for the year? Normally its first offer would be a resit/retake package to be completed over the summer with either capped or uncapped marks depending on whether you have approved EC/MCs.
I'm not sure if you can "apply" to retake the year per se. It is something that the Exam Board can offer you, at the appropriate point (usually after the resit/retake package has not been completed). If that's the case, then you need to make sure that your ECs/MCs are kept up to date, if applicable.
ESSENTIAL: keep in touch with your Personal Tutor and Programme Administrator, make sure they know what your broad intentions and wishes are. Make sure that you are operating within your uni's regulations in terms of keeping your options open.
As to the second question, which is about whether or not you are doing the right thing. You are currently berating yourself on what you should've and shouldn't've done. I think you should be kinder to yourself, accept that you are where you are, and look more to the future. What is coming across is that you want to get a degree and are clearly capable of it to a high standard.