It's not a ring on your finger, a lifetime supply of your favorite Ben & Jerry's flavor or a winning power ball ticket that'll ensure you leave this earth with a smile on your face. Instead it's the company you keep -- and how much effort you put into keeping it.

Maintaining an active social life, even when your health begins to fail you, might be the key to leaving the world on a happy note.

New research published by the American Psychological Association suggests seeking a lively social life and prioritizing social activities and goals can help to mitigate the decline in well-being people often experience later in life. This study is enlightening because it explicitly points to actions we can take to make the hardships of getting older less daunting.

Researchers sifted through data from over 2,900 now deceased participants in the nationwide German Socio-Economic Panel Study, a nationally representative annual longitudinal survey of 30,000 adult residents in former West Germany from 1984 to 2013 and former East Germany from 1990 to 2013. The SOEP collected information annually on many aspects of participants lives, including their employment, occupations, earnings, health and satisfaction indicators.

Participation in social activity and social goals were both linked with higher well-being later in life, researchers found. On the flip side, low social participation and a lack of social goals were independently linked with lower reports of life satisfaction.

And in this case, blood may not be thicker than water. Interestingly, family goals were not associated with high late-life well-being. "Family life is often a mixed bag and represents not only a source of joy, but also of worry and tensions, stress, and sorrow," study lead author Dr. Denis Gerstorf, of Humboldt University, said in a news release.

"For example, valuing one's partner often makes people vulnerable to declines in well-being when the partner suffers from cognitive or physical limitations," he said.

According to researchers, valuing social pursuits could contribute to well-being by escalating feelings of ability, concern for the next generation and belonging. And dedicating one's resources to social activities may be beneficial by promoting physical and mental function and fostering a sense of self-esteem and control.

It's all kind of a beautiful thing. It's a reminder that as we age, we should keep the friends who've stuck with us through the ups and downs, and make new ones along the way.