Not going to hell is easy. Saint John tells us
“Whoever believes in him is not condemned, but whoever does not believe stands condemned already because they have not believed in the name of God’s one and only Son.” – 1 John 2:1 NIV
Jesus is our advocate and his intercession on our behalf covers both the things we can remember and the things we can’t remember. There is only one qualification for salvation and Jesus tells us;
“For God so loved the world that he gave his one and only Son, that whoever believes in him shall not perish but have eternal life. Whoever believes in him is not condemned, but whoever does not believe stands condemned already because they have not believed in the name of God’s one and only Son.” – John 3:16, 18 NIV
To be saved, all we have to do is believe and rely on God for salvation. The reason we must rely on God for salvation is that we cannot save ourselves. There is only one way God has given us to be saved and it is Jesus Christ.
When you ask, “can a believer who died in sin go to hell?”, I want to assume you are saying “a believer who died after lying, cheating, etc” I am always too careful when answering these kinds of questions because it sparks controversy but God’s word is clear on it
“…and if any man sin, we have an advocate…”
The day we believed in Jesus, our salvation BECAME PERMANENT. There isn’t any going back on that and God isn’t going back on his promise. A believer will not go to hell regardless.
How about the case of a believer who died in unbelief? A believer who suddenly stopped believing? Well, he wasn’t a believer in the first place. Concerning such people, Saint John writes
“They went out from us, but they did not really belong to us. For if they had belonged to us, they would have remained with us; but their going showed that none of them belonged to us.” 1 John 2:19 NIV
Finally, God sees what we don’t see, he knows what we don’t know. On the surface, there are things we don’t understand. We may assume to know the state of someone’s heart when they died but we do not. God knows the condition of the heart of every man and what their destination is.
“Nevertheless, God’s solid foundation stands firm, sealed with this inscription: “The Lord knows those who are his,” and, “Everyone who confesses the name of the Lord must turn away from wickedness.” – 2 Timothy 2:19 KJV
In the end, we always leave judgement to Christ and on judgement day, God’s enemy will be destroyed and God’s people will be with God forever as we have always been united to God in the Spirit.
“but the heavens and the earth, which are now, by the same word are kept in store, reserved unto fire against the day of judgment and perdition of ungodly men.” 2 Peter 3:7 NIV
I call you blessed.