One of the most remarkable aspects of human mind is its ability to work even in the most hostile of circumstances. Even when the environment is utterly gloomy, the human mind is capable of producing first class work. Take the case of Kazi Nazrul Islam: he was writing his best songs of the happier mood around the time of the death of his son, because the Gramophone Company of India wanted them.
Or take for instance Richard Feynman. Arlene, his wife, was dying in the hospital, and he was in Project Manhattan working hard five days a week producing first class work, and on the weekends hitch-hiking a ride to the hospital where Arlene was.
Another instance would be that of Louis De Broglie. Dismayed with the way the war was progressing, holed in his room with a pen in hand and loose sheets on his desk, he came up with a paper that made the entire world think again about matter and waves, and how they had treated the two till then.
We can never forget the contribution of Nicholas Copernicus made at a time when the Church governed Science.
Gauss, the King of Mathematics, was born to poor uneducated parents.
I can go on and on listing examples of genius born in despair, but I guess I have already made my point.