An elegy is a poem about a dead person or thing. Uplifting, right?
Whenever you see a poem with the title, "In Memory of… ", for example, you're probably reading an elegy. Kind of like that two-line poem you wrote for your pet rabbit Bubbles when you were five years old. Poor, poor Bubbles.