I do believe that your attitude plays a part in your own contentedness, but you also have to put effort into being happy, it runs both ways. I've tried doing both, and even then it ended up being a failure.
Well, sometimes - often - there are BIG things that you can't simply sidestep with a bit of positive thinking. For example, I'm out of the job market. Why? Because I have an autistic kid that needs 24 hour care. Sure, I can look at it positively and say "here's an opportunity for personal development, learning, patience, character building, and it's rewarding as I love my kid and it's good to do what's right by her". But that doesn't instantly magic away all those parts of my personality that are NOT happy spending the foreseeable future at home the majority of the time, with no discernible life of my own.
Sometimes there are things that really SUCK, that you CANNOT do anything about. Sometimes, big, bureaucratic government departments can destroy someone's life in the time it takes to print a letter saying "appeal unsuccessful", and you're just too small to have any influence over the matter. And you just have to suck it up. Reserving the right to, every once in a while, sigh when it gets on top of you a bit, is perfectly human IMO.
I feel FURIOUS at these self-appointed amateur psychologists who think that just cos they've read a couple of issues of Psychiatric Times or a few articles in Cosmo, they're equipped to give all-encompassing advice on changing their worldview, to vulnerable people (especially strangers!) at difficult times in their lives.