To have set out a few goals, dear to one and fulfilling plenty of one's most coherent and persistently strong dispositions, and to have fulfilled these goals during significant part of a life enjoyed and found worthy of cherishing are feats which produce great happiness. This is the recognition of one's great fortune and extraordinary experience of fulfillment in it.
In youth you figure out what you want to do over a decade or two. These are things that resonate deeply with your talents, desires, and moral aspirations. Staying true to these goals and persistently planning and doing what is best to fulfill one's goals, you end up years later dizzy and in awe of your good fortune.
For us it is a proper function to feel intense gratitude for a good life. This is resulting from and, by feedback, contributing to the effort to fulfill one's goals.
To have done what one wanted, to have excelled in areas that drew one inexorably and with delight at their fitting in with one's set of aspirations and to have experienced deep gratitude for these things bring one to recognize that one has loved oneself well all along, in the sense of Bishop Butler, namely, that one has taken as one's only ends the goals generated from one's most coherent and persistently strong dispositions, including those that require regard for others, as well as those that do not. Certain long-term projects were best and one pursued them instead of fluffy, ephemeral, undesirable pastimes. The relief at having chosen right leads to the gratitude. There is a potential horror or nausea when contemplating the failure to have chosen right.