Mental health took over when I was in my mid teens although now I have started to get back on my feet and I want to change my life. It affected me badly in exams and since Maths GCSE's are now 100% exam-based and have been since around 2008-2009, that is why I failed it. Unfortunately I couldn't help my health at that time, it's a struggle but now I am able, I want to go for it.
Just be aware, then, that certain (as they phrase it) "psychiatric disorders" are considered medical conditions that preclude entry to the RAF.
See
this for more details, but note it's not exhaustive. Your only answer on that can come from OASC.