Two strawmen battle it out to see who will become the One. True. Scotsman.
Your point seems to be that some people aren't subject to mental illnes, and that some of those people are smart, courageous, etc. Sure, and vice versa.
It's not a zero-sum game where you decide you have 12% of this quality and 73% of this one one, so that means you should be compensating for (or naturally adept at) depression by focussing 38% of your energy and intelligence on...social things or whatever.
Secondly, there is no choice in faring better in solitary confinement, whether imposed or elective, nor in social situations because people simply do what they do and follow their emotions and reasoning, for the most part. Would you say Grigori Perelman is mentally ill?