It is possible to work in the medical field despite a background of mental health problems.
You would need to satisfy the safeguarding/fitness to practice panel in any university that you were no danger to yourself, to others on the course and to patients on any placement
At that time you will need an enhanced DBS check when the police may possibly have notice of your condition, and seek to put that on as enhanced disclosure. Please note however, that it is possible to appeal to an independent body, despite what the police may want
In both cases, what you would need to show with medical confirmation is that your condition has stabilised and that you are no longer any risk. There are various other arguments can use, but that is the main one and I am aware of one trainee Dr who has achieved just that
Regards
Julie Corry