A guide to state laws on voting for people with mental disabilities is at
http://www.ndrn.org/issues/voting/resources/state_voting_rights_MD_laws%5B062304%5D.pdf . In general, I think people lose the right to vote only when they have been declared “insane” or “incompetent” by the state.
Obviously the meaning of “incompetent” is loose and arbitrary, looking at our current administration.
Thanks for the link.