It's a bit of everything.
I feel that mindset sets the tone - and mindset can be shaped and changed at will, also. I don't mean that if you are clinically depressed, you can suddenly snap out of it; but that you can gradually start to be conscious of your mindset and try to look at things in a new light.
It's about doing as much of what you love as possible, and as little of what you don't. Misery tends to set in when you are not happy with your life overall - when your actual life isn't in alignment with what actually brings you personal joy. I think that the "bringer of joy" varies for everyone.
For me, the biggest thing that makes me happy is not being on an enforced schedule. Choosing when I work, and what kind of thing I work on. If I am working a job I don't like (which is true at present), I work on changing my job and I work as few hours as possible in the process.
Because I'm freedom-motivated and very flexible, dreamy, introverted, into nature, etc., I try to shape my life accordingly. I consciously avoid situations that lead to the merry-go-round of "work more for more stuff / acquire more stuff and keep working to pay for it". And I tend to prioritise alone time, for creativity, dreaming, etc. I'm happiest when I'm in a thick forest, on top of a big mountain, or by the sea. So I'm working on incorporating that into my daily life as much as possible (not able to be there yet - but knowing I'm working towards it is something).
So I think it's about finding out what you actually value and prioritising that in your decisions.
It's also about removing the negative aspects of your life, as much as you can. Work you don't enjoy, harmful relationships, etc.
I used to be in an abusive relationship, working in a job I absolutely hated. I eventually, finally, left - and a year or two later, managed to leave the job also. When you've been through something like abuse, and basically gone through a complete emotional/mental breakdown, it gives you an appreciation for life and for freedom. Perhaps for me, this is why I'm so sensitive to any form of control, and perhaps it's why what makes me happiest is to pursue freedom in whatever form appeals to me.
What makes you feel discontent with your life, OP? Is it your job, friends, where you live? Are you bored? Unhappy? Frustrated?