[Objection:] A Pope can be judged and deposed by the Church in the case of heresy; as is clear from Dist. 40, can. Si Papa: therefore, the Pontiff is subject to human judgment, at least in some case.
I respond: there are five opinions on this matter.
...it would be the most miserable condition of the Church, if she should be compelled to recognize a wolf, manifestly prowling, for a shepherd.
The fourth opinion is of Cajetan. There, he teaches, that a manifestly heretical Pope is not ipso facto deposed; but can and ought to be deposed by the Church. Now in my judgment, such an opinion cannot be defended. For in the first place, that a manifest heretic would be ipso facto deposed, is proven from authority and reason. The Authority is of St. Paul, who commands Titus, that after two censures, that is, after he appears manifestly pertinacious, an heretic is to be shunned: and he understands this before excommunication and sentence of a judge. Jerome comments on the same place, saying that other sinners, through a judgment of excommunication are excluded from the Church; heretics, however, leave by themselves and are cut from the body of Christ, but a Pope who remains the Pope cannot be shunned. How will we shun our Head? How will we recede from a member to whom we are joined?
Now in regard to reason this is indeed very certain. A non-Christian cannot in any way be Pope, as Cajetan affirms in the same book, and the reason is because he cannot be the head of that which he is not a member, and he is not a member of the Church who is not a Christian. But a manifest heretic is not a Christian, as St. Cyprian and many other Fathers clearly teach. Therefore, a manifest heretic cannot be Pope….
Next, the Holy Fathers teach in unison, that not only are heretics outside the Church, but they even lack all Ecclesiastical jurisdiction and dignity ipso facto. … Pope Celestine I, in an epistle to John of Antioch, which is contained in Volume One of the Council of Ephesus, ch. 19, says: “If anyone who was either excommunicated or exiled by Bishop Nestorius, or any that followed him, from such a time as he began to preach such things, whether they be from the dignity of a bishop or clergy, it is manifest that he has endured and endures in our communion, nor do we judge him outside, because he could not remove anyone by a sentence, who himself had already shown that he must be removed.” And in a letter to the clergy of Constantinople: “The Authority of our See has sanctioned, that the bishop, cleric or Christian by simple profession who had been deposed or excommunicated by Nestorius or his followers, after the latter began to preach heresy, shall not be considered deposed or excommunicated. For he who had defected from the faith with such preaching, cannot depose or remove anyone whatsoever.”
Nicholas I confirms and repeats the same thing in his epistle to the Emperor Michael. Next, even St. Thomas teaches that schismatics soon loose all jurisdiction; and if they try to do something from jurisdiction, it is useless. Nor does the response which some make avail, that these Fathers speak according to ancient laws, but now since the decree of the Council of Constance they do not lose jurisdiction, unless excommunicated by name, or if they strike clerics. I say this avails to nothing. For those Fathers, when they say that heretics lose jurisdiction, do not allege any human laws which maybe did not exist then on this matter; rather, they argued from the nature of heresy. Moreover, the Council of Constance does not speak except on the excommunicates, that is, on these who lose jurisdiction through a judgment of the Church. Yet heretics are outside the Church, even before excommunication, and deprived of all jurisdiction, for they are condemned by their own judgment, as the Apostle teaches to Titus; that is, they are cut from the body of the Church without excommunication, as Jerome expresses it.
Next, what Cajetan says in the second place, that a heretical Pope who is truly Pope can be deposed by the Church, and from its authority seems no less false than the first. For, if the Church deposes a Pope against his will, certainly it is over the Pope. Yet the same Cajetan defends the opposite in the very same treatise….
Now the fifth true opinion, is that a Pope who is a manifest heretic, ceases in himself to be Pope and head, just as he ceases in himself to be a Christian and member of the body of the Church: whereby, he can be judged and punished by the Church. This is the opinion of all the ancient Fathers, who teach that manifest heretics soon lose all jurisdiction…. The foundation of this opinion is that a manifest heretic, is in no way a member of the Church; that is, neither in spirit nor in body, or by internal union nor external….
(St. Robert Bellarmine, On the Roman Pontiff, Vol. 1, Book II, Chapter 30, trans. Ryan Grant [Mediatrix Press, 2015], pp. 304-310.)