If I have committed a mortal sin but am truly sorrowful and make an act of contrition for it, with the full intention of going to confession as soon as possible and doing penance, but I die before I make it to confession, what happens to me?
Sin is forgiven the instant there is true repentance and conversion of heart. For a Catholic, evidence of repentance and conversion includes the understanding that it is normatively necessary for him to confess his mortal sins to a priest as soon as is possible for him to do so. The Catechism of the Catholic Church says:
“Individual, integral confession and absolution remain the only ordinary way for the faithful to reconcile themselves with God and the Church, unless physical or moral impossibility excuses from this kind of confession.” There are profound reasons for this. Christ is at work in each of the sacraments. He personally addresses every sinner: “My son, your sins are forgiven.” He is the physician tending each one of the sick who need him to cure them. He raises them up and reintegrates them into fraternal communion. Personal confession is thus the form most expressive of reconciliation with God and with the Church (CCC 1484; emphasis added).
Note that the Catechism says that sacramental confession is “the only ordinary way” for reconciliation with God, “unless physical or moral impossibility” prevents it. Simply put, this means that if a Catholic dies before he can go to confession for his mortal sins, as he intended to do, not having been capable of going to confession will not be held against him. If he is seriously injured but recovers, he would then go to confession as soon as he is well enough to do so.