The one-word term for "a sad song" is "dirge". A dirge serves as a musical piece expressing sorrow or mourning. It's often played at funerals to convey deep grief.
Dirge: A funeral hymn or lament.
Ditty: A short, simple song.
Knell: The sound of a bell, especially when rung solemnly for a death or funeral.