This is a pretty complex question: are schools adequately equipped to support students with mental illnesses? I could just say "no" and leave it at that, but that wouldn't be an honest answer.
I think schools do the best they can with what they've got. I've always found that the teachers who are able to best support students struggling with mental illnesses are people who have experience mental illness for themselves. I hold the same opinion in all areas of course, be it teachers, counsellors, therapists, or mere mortals like myself!
So I guess I think schools are doing the best with what they have. I don't think teachers receive enough training in how to support students, and whilst some teachers don't necessarily need that training because they've been where the student is, there are teachers who do need training. Unfortunately you can't teach someone empathy, but you can help them to understand what's appropriate, how to work with the student to ensure they feel supported...honestly the worst thing in the world is struggling and feeling as though you aren't being "seen".
I stick by what I said about schools doing the best they can with what they have, and I don't think it's the schools who are to blame in a lot of cases where there are shortcomings. I think politicians have a lot to answer for, as well as teacher training agencies. There's no doubt that I'm not best qualified to answer this question, so everything I've said here is simply my opinion. I was very lucky to have a few incredibly supportive teachers in my school. Not everyone is so lucky.