Off the top of my head:
Ytsejam
Metropolis pt I
Scarred
Raise the Knife / Take Away My Pain if only counting what appeared on the albums
Overture 1928
The Glass Prison
In the Name of God
Sacrificed Sons
In the Presence of Enemies
A Nightmare to Remember
I don't remember specifically which songs were written first for the MM-era albums, except for At Wit's End being first for d/t.
I say Overture 1928 as opposed to anything else on SFaM because I'm pretty sure that they wrote the original Metropolis pt II chronologically, and that's the first part of the song. Plus it pretty much is the same as what ended up on SFaM.
Regarding how it should be decided, from the band's perspective, it's when the song was completed both musically and lyrically. So some songs may have been completed musically early on, but the lyrics weren't written until later. If I'm not mistaken, this was the case for either or both Burning My Soul or Lines in the Sand. And the original Metropolis pt II would also fit, having been completed musically before most of the songs from FII, but never completed lyrically. So I think this would hold true for I Walk Beside You as well, even if it was complete musically during the ToT sessions.
Finally, regarding what was the first song written for WDaDU, Afterlife was also written while Chris Collins was in the band, but it had different lyrics and vocal melodies back then. So while it was a complete song (musically and lyrically), it wasn't close to what it ended up being on WDaDU. So I'd say at least technically, Ytsejam was the first song written that ended up on WDaDU.