How can we possibly thank God when something like that happens? When He saves us from the very edge of danger and despair.
There is nothing we can do to thank God and repay Him for what He has done, and continues to do, for us. No amount of prayers, lit candles or good deeds would serve as a thanksgiving.
I often think back to the story of the ten lepers healed by Jesus. (Luke 17:12 onwards). Only one man returned to thank Him. Let's imagine the scene. Here is a man at the edge of society. Ostracised, excluded for fear of contagion, with no work, no family and friends, and left to starve and die a horrible lonely death. Jesus heals him.
What can he possibly do to thank Jesus for his healing? No amount of money would be enough to get his life back. No amount of good deeds or prayers or anything else.
And it's the same with us when we see God working in our lives and saving us from horrendous circumstances.
I believe the best way to thank God is to go on living. I'd like to think that the grateful leper spent the rest of his life telling people what Jesus had done for him.
Jesus said, "I have come that they may have life, and have it in all its fullness." (John 10:10).
When God saves us from very difficult situations, I believe He expects us to thank Him and go on living a full fruitful life. To be a good example to others, and to live as Christ would want us to. That's the best way to thank God for His love and protection.
It will not fully repay Him; but it will do.