I will quote some dogmas:
The Sacrament of Penance is necessary for salvation to those who, after Baptism fall into grievous sin. (De Fide)
Perfect contrition bestows the grace of justification on the mortal sinner even before the actual reception of the Sacrament of Penance. (Sent. fidei proxima)
Extra-sacramental justification is effected by perfect sorrow only when it is associated with the desire for the Sacrament. (De fide.)
- Ludwig Ott, Fundamentals of Catholic Dogma
So, it’s something extraordinary that has to happen for someone to come out of mortal sin who is not Catholic. In other words, deus ex machina, an act of God.
Catholic or not Catholic, if you are in mortal sin, and die, you go to Hell, that too is a dogma. So something has to happen before you die, some kind of miracle of grace if you’re outside the Church, or inside and not yet contrite.
So for people who live in mortal sin, one generally has to hope that they have reduced the actual act to venial despite the grave matter, and/or that their ignorance is venial.
People go to Heaven or Hell based upon the will of their lives and the judgement of God. If their life is a choice of a mortal sin instead of looking to find God, one cannot expect anything because
the purpose of life is: Choose God: Yes/No.
We’re not here for any other reason, not for TV, not for medical advances, not for wealth, not for power. That’s not why we’re here. Choose that you make a grave mistake.
Every time a person chooses to go visit his girlfriend for the night instead of doing something for God, that’s a choice right there. The choice of NO. Each time a person flips on the TV instead of looking for the answers, that’s a choice. NO.
Each person fills in the blank. Most people fill it in with No. They choose sex, money, food, pride, power, leisure, self instead.