--
For information that I found useful, I would point out Memory and the Human Lifespan as being very useful for understanding my own consciousness and limitations. TTC tend to be incomprehensibly priced on their main website, but other channels, like audible, offer fair prices if you don't mind the digital licensing.
I want to give you a good answer for this question, since it's a large topic to grapple with. I think there's at least two good approaches. One is identifying what makes you happy, the other is identifying what makes you unhappy. In practice, I combine both when I really need to step back and get control of a situation.
Both are highly contemplative and require you to dig deep. I always start by identifying the superficial, general situation, and then drill down to what I really like or dislike about it. The more specific you get, the more accurate your solutions will be and the more easily you will find them.
This technique is important when there are fundamental problems in your daily experience–if you are going to bed every night unhappy and stressed, and waking up dreading the day. That's the perspective of dealing with unhappiness, because it's natural to think you don't need to do much if you're already happy on a daily basis.
But there are some problems which don't have real solutions, or that you simply have to endure for some duration of your life because the solution is slow. Or sometimes the solution requires a drastic change in your lifestyle, and there is tangible resistance to acting on it because the change will not be reversible.
In whichever case, you have a few options. First, if something has been bothering you for a few days or more and you're getting into a pattern of repetitive thinking, it's time to write it down in bullet points. The old paper and pen overcome the limitations of working memory to keep the whole problem, trees of thought, and eventually list of solutions and their pros and cons, in a visual representation, which you're not going to lose your train of thought on. This gives you confidence you've thought the problem through, and you can refer to it when you need to readdress the issue. You're also more likely to understand the problem in its totality, rather than flipping back and forth between particular aspects of it, and you're more likely to remember the key insights when you've evaluated all the aspects together, since you wrote it down and that happens to be an effective way of translating things into long term memory.
This is something I did when I realised none of my regular activities were bringing me happiness anymore. I wrote the pros and cons of each one, what's changed over the years, and that helped me identify what the specific problems were with them. You can somewhat do it mentally as well if its too sensitive for paper and you have a lot of time, but the point is to escape the prose method of describing a problem and boil it down into its essential aspects so that you can keep the whole issue in your head at once. And if you have trouble doing that in your head, just put it on paper because it's a million times easier. The skill is learning how to describe a problem succinctly. Writing out a blurb about how you're struggling and how it feels is not the idea.
The next technique is to take advantage of your limited working memory. If the problem is just something you have to get through and it's making you miserable the whole day, occupying your mind with something intensive, like learning a new skill, or doing a task which uses your full concentration, will kind of make the thing that's bothering you go away for awhile. It doesn't have to be mindless escapism, it could even be something that works toward the solution to the problem, but the general idea is just to be so occupied thinking about something else that there isn't any left over mental energy for the repetitive worried thoughts. Then when you're done the activity, you'll probably be in a calmer state of mind and hopefully not immediately going back to the stressful thoughts. It is true that sometimes being stressed is so distracting you can't enjoy things you normally occupy your time with, but I would suggest that those are activities which don't use enough mental energy, and give you just enough left over to get distracted and fail at doing the intended activity altogether. It's easy to be listening to a not that interesting show and suddenly find yourself 100% occupied with your stressful thoughts and having totally lost what happened in the last 5 minutes. Activities which require your active participation are a little more resilient and will probably give you a little more self-satisfaction at the end of them.
For problems which are actually trivial, that kind of distraction is great because the effect you're trying to achieve is to weaken the connections in your brain that go to those thoughts. The less you think about something, the less likely you are to think about it in the future. The reverse is true as well.
That's sort of the general case. You're unhappy because something is bothering you, so you either need to understand it really well, or let it go.
But what about more specific instances?
Everything is going well except the one thing you really care about.
One or two things make you happy, but a lot of other things really upset you.
The problems you're experiencing are endangering your health or your work, so they're hard to let go and not necessarily easy to solve.
Things were going really well, but you made one or two errors and now everything has changed and you are having trouble getting over the regret.
This is unfortunately where general life advice starts to fall short. The solutions are tricky and specific to the details of the situation. Even though what I wrote above is applicable, it's often only a starting point, not the full walkthrough to happiness.
Sometimes the path to happiness involves a serious change in the roles you have grown accustomed to playing. It's tantamount to saying you need to change your personality, which seems impossible, or like a large blow to your sense of self and pride. But actually, for my most serious problems and sickening low points, the problem can be that fundamental. There's something about my behaviour that is bringing about sadness, something about the lens I'm viewing the world through that is warping my attitude. All I can say about it is that personality changes are slow, can require a lot of impetus, but have the most profound impact on your quality of life.
At the same time, you need to give fair evaluation to your personality. If you think something about your personality is a good thing in the abstract, but just not helping you in the current situation, you're probably better off not trying to change it, and if you do it's going to be really hard. It's really more the parts of your personality that even repulse you that should be scrutinized. You need to incorporate who you are into your evaluation of situations and decisions on what is best to do, to avoid the pitfalls of following advice which is better suited for someone else. And with that caveat, my techniques are probably only useful to intensely logical, understanding-craving, careful and deliberate, maybe slightly control freaky individuals. That style of problem solving doesn't suit everyone, but it does work pretty well when you're short on outside support, which you likely are if you're unhappy.
That said, probably more effective than all this deep thought is identifying things that make you happy and putting yourself in situations to experience them. But I think that's reasonably obvious. This is kind of what to do when that isn't easy, either because you can't figure out what makes you happy or because you don't see opportunities. This is to help you see opportunities and make things less overwhelming. You wouldn't spend every day doing this, but it would give a direction when your unhappy thoughts are kind of aimless.