I think on some level people are born with a tendency for contentment or happiness. The tendency seems to be written in our DNA.
For example: My husband and I both had unhappy childhoods, his with abuse, mine with alcoholic parents. We are both prone to depression.
But we have two children. They had a great childhood, we made sure of it, no abuse, lots of love and respect. They were not hit or spanked...and we had no trouble with them.
Yet they are both prone to depression as well.
You can't out run your DNA but you do have to learn to cope with it and overcome it in some cases.