Your brain is essentially play-doh. You can sculpt it however you wish. If you aren’t on guard, bad habits can easily become implanted, whether through your own doing, or as a result of an external invasion into your mind by others against your will (however in some cases, you allow it to happen unconsciously). If not corrected, over time these habits can magnify and thus become harder to remove. However, good habits can also be implanted, and likewise, if proper care is taken, those can also be magnified and thus harder to remove.
No one really knows what depression is. Is it genetic and pre-determined, or is it a construct of the mind and malleable? I believe that it is both. But I also believe that, in this depression equation, the genetic factor holds much less weight; your mental outlook and your surrounding environment (location, social circle, food sources, etc.) ultimately determine the end result. You can shape your mind however you like, if you choose… it requires work, and sometimes it requires the help of others, but regardless, everyone has it within their power to do so.
How can you strengthen your brain? Like working out improves your health, working the mind, and reinforcing positive habits, improves the health of your brain. Positive can mean anything you want it to mean; anything that is positive to YOU (truly), not some generic happy-go-lucky x, y, or z that is spoon fed to everyone. Although, there is, outside of the personal, a universal and incredibly powerful tool to strengthen your mind: reading (and another is meditation). Become a voracious reader. Even if you don’t have depressive tendencies, the world needs smarter people.