The reality of troubles in life helps us to be able to constantly gauge our level of trust in God. Without challenging people, pains and circumstances our dependence upon God would rest in the realm of theory. God allows strong challenges to us in order to reveal to us whether or not our faith in His commitment to us is valid.
Israel had rebelled. Israel was told that severe judgment was coming. They feared greatly that God would justifiably cast them off forever. God swept in to tell them that He would revive them when the discipline was complete. His chastisement was not to be interpreted as abandonment. The words of comfort given to Israel in this passage can also express God's loving commitment to you. He is at work and you must never presume that difficulty is equated with His departure. He is by your side. He will hold your hand. He will bring down your enemies. He will continue to lead and love you. Look for Him. Look to Him. Fixate your spiritual eyes upon Him and...trust Him.