Dante's loss of the true way to God is remedied by Virgil's appearance and their resulting journey through Hell together. Along the way, Dante learns to harden his heart against the suffering of the sinners and he matures into a condemnatory figure. Having gotten a taste of God's justice and not understanding it completely, he's both morally and intellectually bound to this pursuit.
Dante sees more suffering in Purgatorio, but takes heart in it because he sees how it improves man's conduct and turns his mind towards God. He acknowledges his sin of pride, and is humiliated enough to begin his penance for it. Dante deals with the pressure of changing mentors; after Virgil disappears, he must get over his devastation and thrust himself into the tests Beatrice puts him through. These require further humiliation and confession. When Beatrice deems him worthy, Dante is given his poetic mission. Finally, he and Statius are purged in the waters of the Lethe and Eunoe and readied for Paradise.
Beatrice's lessons on theology humble Dante to the point where his pride almost never piques. Dante constantly struggles with a new issue – recording and expressing in his poetry what cannot be captured in human language. Dante learns of his ancestors and of his bitter destiny. He is tested like never before by the nerve-wracking examinations of St. Peter, St. James, and St. John. As his vision improves, Dante sees more and more of the true images of Heaven, including Christ and Mary's re-ascent, the Celestial Rose, and finally God himself.