This is not a surprise to God. All this is in His plan. He goes before you and will be there with you. All you have to do is trust Him and walk through it.
When you go through deep waters, I will be with you. When you go through rivers of difficulty, you will not drown. When you walk through the fire of oppression, you will not be burned up; the flames will not consume you. For I am the Lord, your God, the Holy One of Israel, your Savior.
Isaiah 43:2-3 (NLT)
Do not be afraid or discouraged, for the Lord will personally go ahead of you. He will be with you; he will neither fail you nor abandon you. Deuteronomy 31:8 (NLT)