General synonyms:
* Lament
* Dirge
* Mournful poem
* Threnody
* Requiescat
* Epitaph
* Eulogy (although eulogies are typically celebratory)
Synonyms emphasizing sadness and grief:
* Wail
* Keening
* Lamentation
* Grieving song
Synonyms emphasizing reflection and memory:
* Commemoration
* Tribute
* Ode (especially if it's a more celebratory elegy)
The best synonym for elegy will depend on the specific context and the desired tone.