There are several medical conditions that might mean you are not able to join the RAF, and any current psychiatric illness is one of them.
If you have suffered any depressive disorders, with or without treatment, in the last three years then you will not be allowed to join the RAF.
If you want some clarification, then speak with the Recruitment Officer at your local AFCO – although they are not medically trained, they will be able to seek the right information for you.