another Amores couplet that I don't understand

Another couplet from the same poem:

di melius, quam me, si sit peccasse libido,
sordida contemptae sortis amica iuvet!

One of the commentaries says that “di melius” is an exclamatory phrase, with ellipsis of “dent mihi”, that is conveniently translated by the similar expression in English “God forbid”. So that would mean the second line would be something like “may a shabby girlfriend of base station please me” but he clearly means the opposite (God forbid), which is somehow coming from “di melius, quam me”. I understand the “quam me” the least. Since it involves a comparison, maybe that’s what the “quam” is doing somehow, but that doesn’t seem to fit either. If it is a comparison, I don’t know how that works here. I really need help with the grammar here.

Please help! Thanks!

Dave S

melius quam is “better than", as you more than half realize. Di melius or meliora sc. dent or faciant is an apotropaic prayer formula. “May the gods better than that a filthy whorish amica please me!” His class-consciousness is showing.

Thanks again, Michael!

I think I was a little stuck on the idea that “mihi” was supplied in the formula “di melius (mihi dent)” so I was unsure about the “quam me”. I should have realized that the “me” here was actually supplied and there was no need for “mihi”. I was further troubled by connecting “may the gods grant me better than” and an entire following sentence “a filthy whorish amica might please me” because no wording I could think of seemed right. Using “that” as you did now makes it clearer.