Being very intelligent doesn't mean being immune to mental illness, but being intelligent has advantages. It means being resourceful. It means thinking carefully about what a therapist says instead of blowing it off.
In the US, people with the least education are the most convinced that they know more about things than the experts. An American who's semi-literate, who dropped out of school in the 8th grade, is likely to say, "Doctors - what do THEY know?" This is an American thing. A Chinese truck driver doesn't think he knows more about medicine that a doctor.
Bipolar disorder doesn't make people intelligent, but when a person with a lot of intelligence is bipolar, the combination can result in creativity. We're pretty sure that George Frederic Handel was bipolar.
A detective was asked why serial killers are often intelligent and he said, "A serial anything is intelligent. A serial burglar is. Any criminal who keeps committing crimes and can get away with it is intelligent."