I don't think should matter, as long as you can show occupational health that you are now recovered or managing your condition effectively.
I've come close to being sectioned in the past, spent months in hospital and have a significant history of self harm requiring medical intervention, but have just completed my nurse training.
Maybe you could try asking (even a uni you are not interested in if you worried they'll know who's asked) if it's possible?