The poem or song referenced in the query is almost certainly the traditional Irish farewell "The Parting Glass." Its lyrics capture a spirit of acceptance, camaraderie, and facing mortality with grace.
Of all the money that e'er I had,
I spent it in good company,
And all the harm that e'er I did
Was drunk in generosity.
...
So fill to me the parting glass,
Good people, let's drink a toast to me,
You may forget the life that was,
But in life I loved you all.
Like many oral tradition songs, "The Parting Glass" exists in countless variants. It has been recorded by The Clancy Brothers, The Dubliners, Ed Sheeran, and countless pub sessions. Its endurance lies in its honesty: it acknowledges the messiness of a life while affirming its fundamental warmth.