There is no authority to declare or consider an elected and generally accepted Pope as an invalid Pope. The constant practice of the Church makes it evident that even in the case of an invalid election this invalid election will be de facto healed through the general acceptance of the new elected by the overwhelming majority of the cardinals and bishops.
Even in the case of a heretical pope he will not lose his office automatically and there is no body within the Church to declare him deposed because of heresy. Such actions would come close to a kind of a heresy of conciliarism or episcopalism. The heresy of conciliarism or episcopalism says basically that there is a body within the Church (Ecumenical Council, Synod, College of Cardinals, College of Bishops), which can issue a legally binding judgment over the Pope.
The theory of the automatic loss of the papacy due to heresy remains only an opinion, and even St. Robert Bellarmin noticed this and did not present it as a teaching of the Magisterium itself. The perennial papal Magisterium never taught such an option. In 1917, when the Code of Canon Law (Codex Iuris Canonici) came into force, the Magisterium of the Church eliminated from the new legislation the remark of the Decretum Gratiani in the old Corpus Iuris Canonici, which stated, that a Pope, who deviates from right doctrine, can be deposed. Never in history the Magisterium of the Church did admit any canonical procedures of deposition of a heretical pope. The Church has no power over the pope formally or judicially.The surer Catholic tradition says, that in the case of a heretical pope, the members of the Church can avoid him, resist him, refuse to obey him, all of which can be done without requiring a theory or opinion, that says that a heretical pope automatically loses his office or can be deposed consequently.
Therefore being it so, we must follow the surer way (via tutior) and abstain from defending the merely opinion of theologians (even be them Saints like St. Robert Bellarmin), which says that a heretical pope automatically loses his office or can be deposed by the Church therefore.
The pope cannot commit heresy when he speaks ex cathedra, this is a dogma of faith. In his teaching outside of ex cathedra statements, however, he can commit doctrinal ambiguities, errors and even heresies. And since the pope is not identical with the entire Church, the Church is stronger than a singular erring or heretical Pope. In such a case one should respectfully correct him (avoiding purely human angerand disrespectful language), resist him as one would resist a bad father of family. Yet, the members of a family cannot declare their evil father deposed from the fatherhood. They can correct him, refuse to obey him, separate themselves from him, but they cannot declare him deposed.
Good Catholics know the truth and must proclaim it, offer reparation for the errors of an erring Pope. Since the case of a heretical pope is humanly irresolvable, we must implore with supernatural faith a Divine intervention, because that singular erring Pope is not eternal, but temporal, and the Church is not in our hands, but in the almighty hands of God.
We must have enough supernatural faith, trust, humility, spirit of the Cross in order to endure such an extraordinary trial. In such relatively short situations (in comparison to 2000 years) we must not yield to a too human reaction and to an easy solution (declaring the invalidity of his pontificate), but must keep sobriety (keep a cool head) and at the same time a true supernatural view and trust in Divine intervention and in the indestructibility of the Church.
+ Athanasius Schneider