Thanks to Redditor /u/dtxvsk, we have an answer to that fascinating question:
The oldest melody which is known to have survived in its entirety is the Song of Seikilos, which was composed in Greece around 200 BC. The song, which was written by a man named Seikilos in memory of his recently-passed wife, was found engraved on a pillar in her grave.
It’s so strange and moving that this simple dirge has endured for more than two thousand years. Would Seikilos be touched to know that his wife’s memory, through his music, has lived on for millennia?