How to live a good life? That's the basic philosophical question. Aristotle's answer was live virtuously. Do what a virtuous person would do, and that will make you happy. Well, not exactly happy, but eudaemon.
Eudaemonia, sometimes translated as flourishing. is what we all want. It's the one thing people seek for its own sake.
Eudaimonia isn't a matter of one or two moments of bliss. As Aristotle put it, one swallow doesn't make a summer. It's the result of a successful life lived well, together with a bit of good luck. In his Nicomachean Ethics, basically an early self-help book, he explained how to flourish by cultivating the virtues.
Every virtue is a disposition to behave in certain ways that lies between two extremes. Courage, feeling the fear but doing it anyway, lies between cowardice, when you feel the fear and can't do it, and recklessness, when you don't feel the fear when you should. Generosity lies between stinginess, when you're mean, and profligacy, when you throw your money around, and so on.
This is Aristotle's doctrine of the golden mean. Whether you can act virtuously or not, in part, depends on how you've been brought up, your moral education, as well as on the choices you make. If that goes well, you'll act appropriately and feel the appropriate emotions, whatever situation you find yourself in.