Wrong. I lost at least a decade of really great years to this belief. It's bullshit. I've made huge strides in my "clinical" depression despite my environment not markedly improving. I did, however, improve myself enough to recognize and stop maladaptive behaviors.
It's hard as hell to change yourself, but you're not immutable.