It hasn't much to do with rational thinking. Mental health is not something that we are conditionned to think about. Among other things, it relies heavily on a fine balance of chemicals in the brain. You have been able to think of your circumcstances rationally, and your are better for it. However, stress can easily lead to despair for various poeople, even if their circumstances are not as dire as those of others. Just as some people may be consumed by rage for no good reason.
Mental health is tricky, and I am certainly not an expert on the subject or on how to maintain it. Hopefully as a society we can move on from it being a taboo subject to people being able to routinely seeking help or just evaluation. How many tragedies could be avoided then?