Can I use an expired IFR-certified GPS with an out of date database in lieu of DME?
The answer would appear to be "Maybe", per the AIM (table 1-1-6): You are permitted to use an IFR-approved GPS "In Lieu of ADF and/or DME", however the footnote (3) to that table tells us that this use


  Requires current database or verification that the procedure has not been amended since the expiration of the database.


So if you're using the GPS to calculate something like "5 Miles DME from JFK VOR" that would seem to be acceptable (the FAA is unlikely to pick up JFK VOR and move it without making a lot of noise about it), but if you're using by punching in a fix that's defined by DME and a radial you would need to somehow verify that the fix hadn't been redefined. 

You can accomplish that verification in a number of ways (a current IFR chart on your iPad or a current paper chart seem like obvious ways). As long as you can satisfy yourself (and the FAA) that the data in the GPS is accurate the operation would appear to be permissible.

It would also appear that if you verify that the fix has been redefined (say FUBAR was 5 DME, now it's 6 DME) you could still use the GPS distance data in lieu of DME, just not the incorrectly-programmed fix. That is, you could determine when you're 6 miles DME from JFK VOR, and since you know the FAA didn't move the VOR and that the fix is now at 6 miles you now you're where you want to be.