It depends on the mental disorder and its severity. There are an awful lot of people running around with what could arguably be considered undiagosed and unaddressed mental disorders, and many of them are in positions of relative power. Being diagnosed is a good thing.
By the way, it is widely accepted that although in his day he was never labeled as having a mental disorder, Abraham Lincoln had bouts of severe clinical depression. Depression isn't merely feeling very sad; it is having your emotions (and energy) held down, depressed. He once wrote something like, "If the despair I feel today could somehow be distributed evenly among the population of the Earth, there would be not one smiling face anywhere."
Also, having a "disorder" means mostly than you are not near the statistical norm. With that in mind, is Robin Williams mentally ill? (Well, maybe a bad example . . .) How about ANYONE who runs for major public office - are they "normal"?
As for your sheriff, his manic bi-polar condition may or may not be the main cause of his legal issues in the office. Think of Clinton and Lewinsky - aside from any legal, ethical, or moral considerations, and aside from political party affiliation, although he embarrassed the entire country with his poor judgement, his "activity" in his personal life was not a DIRECT measure of his capability to do his job.
So, again, I repeat my answer: it depends on the mental disorder and its severity.