If you are under the age of 16, the council must give you emergency housing. Also any Landlord cannot make you homeless.
As for mental illness I would think it’s via your GPs report etc, that is if your over 16. Up until then the councils etc have a duty of care to fine emergency housing.