A Catholic who goes to Mass every day, and yet cannot receive Holy Communion, is feeling the effect every day of his choice to remain separated from the Lord. If he does not just show up and keep a pew warm, but makes a spiritual communion, how long will the person last without finally giving in to repentance?
I remember a passage in the Screwtape Letters where the devil notes that a man in debt hates the very sight of a bankbook. If a person in mortal sin avoids Mass, they will have a much easier time denying to themselves Who is Is that they are rejecting by holding on to their sin.
I do not know if there is any “merit” by attending Mass while in mortal sin, but there is everything to be gained. I mean literally: everything, because with the life God within us, we are nothing. There isn’t an intention more pressing than that. You don’t go before the throne of grace asking for favors for someone else or help with a minor problem, when you yourself have one foot in the grave and are bleeding out all over the place. It is not that God ignores your other desires, so much as God will attend to the mortal sin first, as that is the greatest wound to be tended.
If you want to talk yourself into opening a door, then stand next to it, where the knocking is the loudest.