Actually, the code states:

… has been or is adjudicated by a state or federal court as mentally incompetent, unless the adjudication has been withdrawn or reversed; …

That’s very different from simply having a mental illness, like anxiety.