Can a person lose salvation if publicly denies Jesus but keeps living a christian life? (Catholic) I just watched the movie "Silence" and made me wonder if a person can lose his salvation if he keeps publicly denying Christ but privately(secretly) still living a Christian life?

Matthew 10:33


  But whoever denies me before others, I will deny before my heavenly
  Father.


Not many of us must defend our faith to the point of death.  Does God have mercy on us if we deny him publicly(if death penalty) but internally we still follow his commandments and try to live a Christian life or is it ok to deny faith in Christ in order to save someone else's life? What does the Catholic Church say about this?

Note: please avoid commenting on the movie. I know it wasn't the best one and I didn't like the ending too. I already read the reviews and how the role of martyrdom was wrongly understood.
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
deal.
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
to.  

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.  

Peace.