Sorry to hear that you've been feeling like this. I would firstly advise that you definitely take a breather and set some time aside to rest and/or engage in a hobby that you love, whether it's the arts or writing or sports, etc. You seem to be very worried about your studies, but just remember it's literally impossible to function without time away. If you truly want to work to your full potential, take regular breaks where you need it. They'll allow you to reset, to gather your thoughts and even point out where you're being irrational. The more you entertain your slightly OCD tendencies, the worse they will become. When you feel yourself doing something you don't really need to be doing, pause for a second, and ask yourself if you really need to be doing this. If logically you know there is no need, stop yourself there without a second thought. The more time you spend thinking about it, the more you'll get in your own head and convince yourself to carry on.
Also, I think you need to work on changing your mindset and I know it isn't easy, but you need to constantly remind yourself that it is impossible to be perfect. As humans, we are born to make mistakes and there is no need to put constant pressure on ourselves to reach perfection because 1. we'll never be happy, and 2. we'll never reach it. Accept that it is not the end of the world to make mistakes and that you needn't be so hard on yourself. Take life with a pinch of salt and let yourself be free from your own constraints. & that's not to say don't aim for high grades, but it's just to say do your absolute best and be extremely proud of yourself regardless of the result. There is not a single age in life where we stop learning, so even in times where you put your all in and feel it hasn't paid off, you learn from it. You learn what you did wrong, you learn how to do better next time, and that's fine. You should still be proud of the effort you put in, because you tried and as long as you take the steps to improve in time for your exams, you'll be fine! A-Levels are SOLID, I completely acknowledge how difficult they are but try overcoming that by getting extra support if you need it. Sometimes you have no choice but to work through the hard, but just remember that you're only doing it for a short amount of time in your life. The hard will be over and soon you'll be doing your degree and looking back at this.
Definitely take a short break away and then when you come back to it, try to focus on tasks such as sleep/diet/exercise to keep your mood up. It's so stereotypical to advise this but it's underrated how much these things really help. If it gets overwhelming, do one thing at a time. For example, make sure you've had enough sleep so you don't wake up tired. Once you're up, make sure you fuel yourself with something to start your day. When you have a little free time, try to do some exercise or go out for some fresh air; open space can HEAVILY impact you and literally a 10 minute walk can do the job. Just doing these little things can make you get back in touch with the world around you when it feels like you're drowning in your own thoughts. Sometimes it's hard to find the motivation to do this, especially when you're surrounded by all the work/revision you have to do but just remind yourself that it's gonna make you feel better and help you reset your thoughts.
I wish you all the best with your A-Levels and hope you absolutely smash them!