“If you want to be happy, be so.” – Kozma Prutkov. Now about the technology. You have to avoid two traps:
The first one is the reality. Know your reality, but do not put too much into it (except professionally), a healthy dose of delusion always keeps the spirits up. I’m not advocating religion (as an atheist), but do appreciate the serenity of occasional wishful thinking.
The second one is purpose landing. Most of the people, most of the time (if you allow me the cliche) do things for a reason other than the things themselves. They pick a profession not because they like doing it, but for money or status. They have kids not because they like kids, but to assure long and stable marriage. I’m not saying it’s always possible, but for the important stuff – try really hard to do things for the sake of doing them.
Enjoy the journey, because you are the journey.