I think it is a mixture of the two. I think your gene pool has a lot to do with the eventual production of your personality. If you have a side of your family that is predisposed to depression or mental illness, it goes to say the biological preexisting conditions are there for you to develop the same mental traits that seem to run in your family.
I also think, however, we can not totally blame personality development on a person's genes he has inherited from his family. There are a lot of things that are mental, that go into the production of how a person feels about himself and how he responds in a given situation that are learned. Life itself can be a stern taskmaster, teaching difficult lessons we either try to avoid in the future, or take and encounter head-on. My wife hates to visit my parents, because they are always complaining about health-related issues and how "bad" everything surrounding their lives is. But she is quick to point out, "You are not that way, you are fairly positive." Somewhere along the line, you make a conscious decision to head in a definite direction that fuels the mental side of who you are.