Nope, nary a whit.
The only
requirements concern age, place of birth, and length of residence.
In fact (to give a really silly example) Benedict Arnold would have been "qualified" for the office of President of the United States of America (even after he "defected" to the British).
Depending on what the mental illness was (and its then current condition), indeed they would be. For example, someone who was a diagnosed schizophrenic
but who was in compliance with their medication regime would not be
actively UNABLE to discharge the duties of the office of President.
Article II, Section 1, Clause 6 of the Constitution of the United States of America says (inter alia):
In Case of the Removal of the President from Office, or of his Death, Resignation, or Inability to discharge the Powers and Duties of the said Office, the Same shall devolve on the Vice President ...
"inability to discharge" is NOT defined, but I have no doubts that "being in a vegetative state" would almost certainly qualify (with the caveat that there is some uncertainty if the current administration would recognize what a "vegetative state" is if it came up behind them and bit them on the ass). However, any condition SHORT of "being in a vegetative state" would only be covered
IF "Congress" so decided.
While the Vice President, together with a "majority of either the principal officers of the executive departments or of such other body as Congress may by law provide", can DECLARE the President to be "unable to discharge the powers and duties of his office" in a written declaration, it is up to "Congress" to ratify that declaration AND should "Congress" refuse to ratify that declaration, then the declaration would be of no force or effect.
In fact, there is some question as to whether or not "Congress" could actually order the President to undergo an independent medical examination to determine whether the declaration was, in fact, footed on solid medical/psychiatric grounds.