If you were a true, honest, believing Christian but you were in a situation where you were being tortured and through torture you were forced to renounce your faith in Jesus Christ, but in your heart you are still a Christian, feeling ashamed that you were too much of a coward to not resist denying Jesus Christ through torture, are you still saved?
I assume this is a hypothetical question, but rather than only give you a hypothetical answer I’m also going to refer you to a book called Foxe’s Book Of Martyrs. It’s about the persecution of Christians in the early days of the Church and describes many Christians being called upon to suffer and die for their faith. Jesus mentioned this period in His letter to the Church in Smyrna, saying, “Be faithful, even to the point of death and I will give you the crown of life” (Rev. 2:10).
In his book, John Foxe documented how these martyrs were given a special measure of God’s grace which allowed them to suffer the terrible physical punishment they endured, often singing songs of praise while they were being tortured, without denying their faith.
That said, the New Testament states in no uncertain terms that our salvation is based on what we believe, not on how we behave (John 3:16, John 5:24, John 6:28-29, John 6:40, Romans 10:9, 1 Cor. 15:1-4, Titus 3:4-7, etc.). Also, in three places Paul clearly explained that our salvation was guaranteed from the moment we first believed (2 Cor. 1:21-22, 2 Cor. 5:5, and Ephesians 1:13-14).
Therefore it would be reasonable to conclude that your hypothetical person would retain his or her salvation. The only exception the Bible gives is for those who worship the anti-Christ or his image or take his mark (Rev. 14:9-11). Tribulation believers will be expected to die rather than to be disloyal to God.