It's easier than one thinks. Contentment is based (like so many things in life) in perspective. The secret is to recognize what is really important (not some importance that is thrust upon us by our society or through marketing) and what is not. The ability to laugh at one's self and the absurdities of so many things in life is another aspect that enables a person to become content.
There is a difference between material contentment (living a life of material plenty) and "spiritual" contentment. The first deals with possessions, which...if they should go away, so does the contentment. The other is based in the ability to live beyond the material world and understand that it is the contentment of the body, mind, and soul, that enables a person to travel through life in a contented state.
It also contains elements of that old expression, "Don't get too high with the highs, or low with the lows." Of course, we all experience great joy and happiness, as well as sorrow and tribulations. And yes...our emotions deal with those things in many ways. However - once one understands that these things too shall pass, the recognition that we are living in a journey that is finite helps us see that mellowness, balance, and calmness, will enable us to enjoy all the aspects of life in a deeper, more textured manner.
If you realize that contentment is already inside of you and that all you have to do is reach in, discover it, embrace it, and then live it...you will have found the magic of an incredible way of life.