The Bible tells us that if a person has truly trusted Jesus Christ for his or her salvation, then they belong to Him forever, and they will be with Him in heaven forever. Jesus said, "I give them eternal life, and they shall never perish; no one can snatch them out of my hand" (John 10:28).
Never forget: No matter who we are or what we have done (or failed to do), we are saved solely because of what Jesus Christ did through His death on the cross for us. We were lost and captive to sin -- but Christ paid the price for our redemption. The price was His own blood, which He shed for us because of His love and mercy. Because of Christ, the Bible says, "We have redemption through his blood, the forgiveness of sins" (Ephesians 1:7). We are saved solely by His grace, not by our goodness.
Does this mean it doesn't matter how your husband lived? Not at all. If he could speak to you right now, he would urge you to live for Christ. Instead of receiving Christ's commendation, Christians who fail to live as they should will enter heaven "only as one escaping through the flames" (1 Corinthians 3:15).
Take comfort in God's grace to your husband -- and to you. But most of all, make it your goal to put Christ first in your life, and to keep your eyes fixed on Him as long as you live.