I think it's combination of:
A) How you think, which influences how you feel, which influences how you behave, which influences how you feel which influences how you think which influences how you behave which influences... (and round we go) which can be helped by looking into CBT;
and
B) The way you experience the world based on your consciousness, as made by the neural networks that are most used in your brain/connections that are made.
I think that for some people A can be enough, and it will sort out B for them (new behaviours resulting in new neural networks resulting in a new way of experiencing the world) but for others it isn't enough.
A alone also doesn't answer for people who are happy despite being incredibly restricted/limited to certain behaviours (e.g. imprisoned) who can't just change their behaviour/situation.
B is what interests me at the moment. I think that depending on your consciousness (which I'm defining as your active neural networks) you can experience the same situation completely differently.
For example, I think when people drink, they are changing their pattern of neural networks (or the alcohol is doing it for them by triggering chemical reactions which opens certain receptors and closes others) which changes how they experience (think and feel about) a situation. For a lot of people, alcohol makes them experience it in a way that feels better - they enjoy the situation because they feel more relaxed and confident.
I think this happens because the chemicals have altered the processes/networks in the brain, and they experience a different way of thinking or being than they usually do.
Now, this 'usually do'. I think the way we 'usually' think or feel comes from the neural networks that we have in our brains that have been formed over a lifetime of thoughts, feelings and experiences.
Some of us have established neural networks (and subsequent thought patterns) that make us view the world/events in ways that leads to stressful thoughts/feelings without knowing that we're doing it. It before our 'reality'.
For example, a friend might call round and our immediate thought is 'oh god, I'll have to prepare, what should I wear, do I have anything to wear, what shall I talk about I haven't done anything recently, oh last time was really boring because she talked about her husband the whole time' and then you feel down and stressed and you don't go.
Now, I'm not saying the solution is to see friends you find boring, I'm using this example to show how established thought patterns that tend toward negativity can make us feel bad, and not do things that would probably be good for us, and we can get stuck like this.
The thought patterns are there for a reason in an evolutionary sense - having established thought processes would have helped protect us and make decisions (I won't go near that lion again, it bit me last time), but it seems to me they can take over, and we can get stuck in them in a way that can become detrimental to our wellbeing.
So basically, if I had to guess, I'd say you have some established neural networks that are leading to a way of experiencing the world that feels unpleasant.
If this is the case, the solution is to try and break free of these established thought patterns and start to form some new ones that lead to different feelings.
How does one establish new neural networks? As a start, I would have to say try point A (CBT, cognitive behavioural therapy) to ensure there's nothing you're obviously doing that's leading you to feel like this.
After that, I think the starting point is to accept there's no one 'right'/'real' way of viewing the world. Two people can experience the same situation and feel completely differently about it. One is right and the other wrong. A person who gets shouted at in the street for accidentally walking into someone and ruminates about it all day isn't more 'right' than someone who apologises, laughs it off and forgets it.
You know that your brain CAN experience the world differently if you've ever been drunk or high off exercise, it's just getting it to do it in a way that's healthy and accessible.
It's why I'm not completely against drinking or certain drugs when taken OCCASSIONALLY and in a safe manner - they can help people who are depressed to understand that there IS another way of experiencing the world (depressed people often feel 'stuck' and like they're doing the world 'as it really is' and that's the only true way of feeling). The risk of this is that a lot of people then go on to addicted to substances, because of how they change the way they experience the world. That's the risk that must be considered and managed alongside the initial benefit of reminding the depressed person there is something to live for.
Once you're at the stage of accepting there IS another way of experiencing the world (hopefully you're already there), the question then becomes how do you get to a point where you can expand and/or reconfigure your neural networks to show you to think and feel differently (more positive, open and less stressed) about things on a day to day basis.
Certain practices (mindfulness and meditation) are a good place to start, but there's a lot more or there, which I'm only really starting to discover myself.