Does a priest have to consume the Eucharist no matter the state of his soul?
Can a priest decide not to consume the Eucharist during mass if in doubt whether he is in mortal sin?
The short answer is no.
The celebrant must always consume the sacred host at mass, in which he acted as a consecrator of the sacred species.
Moreover, the celebrant's Communion is required for the completion of the sacrifice of the Mass; Christ is present under the species of the eucharistic sacrifice after the manner of food and drink, and so is meant to be consumed.
Finally, the priest must receive Communion under both species: "So far as the sacrament itself is concerned it is most fitting that both the body and the blood be received since the perfection of the sacrament rests in both, and therefore, because it is the priest's duty both to consecrate and to complete the sacrament, lie should never receive the body of Christ without the blood" (Summa, Ilia, q. 80, a. 12; cf. also ad 1). The priest has a divine obligation in this respect. - The Priest's Communion
The priest in question must make a perfect act of contrition if he committed a mortal sin, as best he can and must go to confession as soon as possible. He may under some circumstances still say Mass. The Church has very clear guidelines on this subject:
When receiving or celebrating the sacraments, the priest is subject to the same requirements of sanctity and state of grace as every other Catholic; that is, the state of grace is required for fruitful reception of all sacraments except those that actually forgive sins.
Therefore a priest who is in a state of mortal sin should seek to confess as soon as possible and refrain from celebrating the sacraments until he has done so.
Normally, to celebrate Mass or receive Communion while in a state of mortal sin would be to commit a sacrilege. Yet, the sacrament would be valid; that is, there would be a true consecration and a true sacrifice.
The reason is: Christ is the principal actor of the sacraments, so they are efficacious even when performed by an unworthy minister. As St. Thomas Aquinas says: Christ may act even through a minister who is spiritually dead.
However, a priest who has fallen into mortal sin, but who is unable to make his confession despite his desire to do so, may celebrate Mass for the benefit of the faithful without adding a further sin of sacrilege.
Thus, as Canon 916 of the Code of Canon Law states: "A person who is conscious of grave sin is not to celebrate Mass or receive the body of the Lord without previous sacramental confession unless there is a grave reason and there is no opportunity to confess; in this case the person is to remember the obligation to make an act of perfect contrition which includes the resolution of confessing as soon as possible (see also Canon 1335)."
Note that the code requires a grave reason in order to avail of this exception.
One such grave reason is based on the principle of the good of souls. If a priest is required to celebrate Mass or a soul requests the sacrament of reconciliation, the anointing of the sick, or indeed any other sacrament from this priest that would have to be performed before he can avail of confession, then he may, and usually must, administer the sacrament.
A second grave reason stems from the danger of infamy by publicly revealing the state of one's soul.
This can occur in the case of a priest in isolated circumstances when there is no one else to perform the usual celebrations. There is no need for him to do anything that might lead people to suspect his lack of a state of grace.
Even in the case that the priest, or any other person, has secretly committed a grave crime, which would normally lead to his or her being automatically forbidden to receive the sacraments, Church law (Canon 1352) foresees the possibility of the penalty being suspended to avoid infamy or scandal, to wit:
"§1. If a penalty prohibits the reception of the sacraments or sacramentals, the prohibition is suspended as long as the offender is in danger of death.
"§2. The obligation to observe an undeclared 'latae sententiae' penalty which is not notorious in the place where the offender is present, is suspended totally or partially whenever the offender cannot observe it without danger of grave scandal or infamy."
While the possibilities of a layperson or a religious in a state of mortal sin being placed in a similar dilemma as the priest are far rarer, the same basic principles would apply should they occur.
Furthermore, while it is nobody else's business why somebody does not approach Communion, pastors should do all that they can to avoid creating public pressures that might induce a person in a state of mortal sin — or otherwise unable to receive Communion — to receive out of an objective fear of infamy or even out of human respect.
For example, when parish ushers move down the aisles during Communion to assure an orderly procession, it becomes very difficult for someone, especially if well known to the other parishioners and who for some hidden reason cannot receive Communion, not to go forward with the others because staying in the pew is often the equivalent of making a public self-denunciation.
In such cases, a less organized procession at Communion allows such people to pass unnoticed. - When a Priest Is in Mortal Sin
As a side note: I have known of cases in the Extraordinary Rite of the Mass (as we now call it) where a priest had forgotten to fast in the morning before Mass and did not say Mass that day because the fast was not observed.