There's definitely a correlation between intelligence and depression, and at the highest levels it's pretty much 1-to-1 (i.e. nearly all of the smartest people to have lived have suffered through depression), but I don't think it's because of some deep depressing facts that geniuses know. I think these reasons mostly explain it:
1) Most ridiculously smart people are actually bipolar. Mania obviously leads people to be incredibly productive and to take on huge tasks, so a huge percentage of famous people in general are bipolar. I'm pretty sure at least three of the people that you mentioned in your OP have been diagnosed as bipolar (though I think prob all three posthumously, so take it with a grain of salt). Obviously bipolar disorder has two poles, and the other pole is significantly less fun
.
2) People who are really "different" in some ways tend to be different in lots of other ways as well. Really smart people are more likely to come from weird family backgrounds, be gay, have rare physical diseases, etc. Similarly, they're more likely to have various mental disorders. There are lots of possible explanations for this, but it's definitely true.
3) Smart interesting people know that they're smart and are therefore less likely to accept conventional wisdom over their own ideas. Most people consider suicide in their life, but most don't take their own consideration that seriously and accept the conventional wisdom that life is worth living. Really smart people who know that they're really smart probably take their own ideas way more seriously and are probably less likely to accept conventional wisdom. This is doubly true for the type of really smart people that do the kind of interesting things that land them in OOT posts.
4) Smart interesting people tend to live weird, interesting lives (zomg Hunter Thompson) for reasons I explained in part 3 of this rant. As cool as this is, and as lame as it is to think that a cookie-cutter lifestyle might be best, it turns out that it's pretty hard to live an unconventional lifestyle and not be totally miserable.