Epitaph to a Dog, by Lord Byron. There’s more verses to it than what was posted.
Thanks for identifying that.
I have known that for years and have it memorized,
but I never knew where it came from.