There is a few things to consider in order for the answer to make sense:
- We have multiple opportunities while we are alive to repent, be
forgiven, fall into sin, learn from our mistakes, repent again, and
so on. We are basically building christian character and receiving
grace to help us in our journey to heaven. It is not a one time
- We die one time. This is one time deal.
- After we die we will be judge (without going into details on
personal judgement or at the end of times) by Jesus and the
judgement is in the complete life journey we chose. On top of that
Jesus will give us all the Mercy we are willing to accept.
Jesus will not force us into Heaven (salvation) if we do not want
Therefore, it is possible that a person in his early Christian journey lives a life that you can describe as more "secretive or internal". But as the journey and the Christian character becomes more mature and aligned to Christ's, living two life's (one internal and one external) is contradictory.
At one extreme you can find the saints and martyrs that freely chose to be thrown to the beasts or unimaginable tortures rather than renouncing Christ externally (I assume they could have chosen to reject Him publicly but in their hearts still be as committed to Him). They preferred dead rather than renouncing Him even externally.
On the other extreme you can find a person just new to Christianity but not yet strong enough to overcome fear. He could possible be tempted to deny Christ publicly but still recognize him as his God and Savior. If he dies at that moment, then we trust that Jesus, in his infinity mercy and since He know what we have in the deepest places of our hearts, may offer him salvation.
So, my answer to your question is, until one dies, one has the opportunity of repenting and finding forgiveness. Work hard for your salvation by aligning your life to Christs' own life, day after day. And at the end have Hope that Jesus is Mercy itself - but will never bully us into loving him.
Sections that may help in answering further the question or guiding the appropriate response depending on the scenario.
CCC: Grace 1996-2005, Christian Holiness 2012-2015, Faith/Hope/Charity 2087-2094.