An emotional poem or song that memorializes someone who has died can be called a threnody. Your threnody to your beloved dog may be an important part of your grieving process.
Imagine a grief-filled lament sung or recited at the funeral of someone you loved very much. That's a threnody, a work of memorial art that captures the loss we feel after a tragic death. We can trace threnody back to a Greek root, threnodia, which means "lamentation." Examples of threnodies vary from A. E. Housman's 1896 poem "To an Athlete Dying Young" to Eric Clapton's 1991 song "Tears in Heaven," written after the death of his young son.