A somber poem written in mourning for the dead is called elegy, you must have written your options wrong, because I don't see the correct option elegy here.
A ballad is a poem that tells a story, usually of a romanticized character, in short, rhythmic stanzas. An epic is a long poem that tells a story of a hero or legend. A sonnet is a love poem, generally that follows a specific structure. An ode is serious poem written to express strong emotion.