In Catholic dogmatics, I just wanted to clarify, as the Catechism says: "imperfect contrition cannot obtain the forgiveness of grave sins".
You can read on Catholic encyclopedia, that perfect contrition is sorrow for sins because of a pure motive / love for God without reference to one's own damnation or existential position. It is the idea that you love God even if he damns you, or as Rowan Williams notes 'the Catholic doctrine of pure love' so detestable to Protestants.
When perfect contrition is united to a desire to go to confession as soon as possible (again this part is another issue, what does the word 'possible' mean), then sin can be remitted if someone dies. But, to go back to the example, I'll use myself.
Currently I have 24 mortal sins and counting on my soul (last confession was about 3 weeks ago). Right now, I am sorry for my sins and I would guess that it is mostly because I'm going to Hell, if I could just be accepted by God without having to confess, then I wouldn't worry about confessing it, meaning that I guess I'm not really sorry or 'sorry enough'. So if I was on my way to confession on saturday and got hit by a bus or died somehow, God would not accept me into Heaven. Christ's death, my baptism, my faith, my desire to repent, none of it would have any effect on my soul. It would remained stained, I would be damned.
But again as I've previously noted, the Catholic position is not based on Existentialism. What happens to me does not matter, what matters is what is objectively true. The objective fact of Catholicism is that God has established the Church and the Sacraments as the means of Grace. No matter how much I might find that fact inconvenient or frustrating, doesn't matter, because the truth of the matter is that I find myself in the situation, I do not make my own situation. So I get it, I'm not saying the Catholic Church is wrong because I can't be saved in it 6 days out of the week, that's just bad philosophy. Likewise if one goes the Existential/Protestant route, one has equally troubling issues like "have I picked the right church?" or "how can I be sure Justification is by faith alone?".
As they say, there is no rest for the weary.