Depends on the mental illness. Depression, OCD, and Borderline personality kids would probably work out okay, but schizophrenics or bipolar or anything with psychotic or manic episodes are probably going to have an issue. I don't think I'd want a physician who was prone to psychotic breaks. 😱 Of course, I think med school makes us all a little crazy... so maybe none of us are fit.
If they get better drugs for these things, maybe it wouldn't be a big deal. After all, they used to say "homosexuality" was a mental illness, and I am comfortable with them being physicians.