I knew that logically, but it didn't really sink in until my reading last night. I've been reading the Bible again, starting with Genesis, so I've been following along the Israelites on their journey from slavery in Egypt to freedom in the Promised Land, a journey that readily mimics that of my own life. Let me refresh your memory, if you don't mind, with the story.
The Israelites moved to Egypt to escape a famine in their own land, a land that God had promised their patriarch, Abraham. After four hundred years in Egypt, the pharaoh enslaved them until Moses came with a directive from the Lord to "Let my people go!" After ten plagues (and the death of his firstborn son), the pharaoh finally gave in and released them, only to change his mind and give chase. God demonstrated his power by parting the Red Sea for the Israelites to cross and then killing all of the pursuing Egyptians by bringing the waters together again. Moses spent the next forty years leading the Israelites through the desert while God taught them what it meant to be his followers. They learned what holy meant through dietary and cleanliness laws. They learned how to respect God through festivals and sacrifices, and they learned how to treat each other through a series of laws regarding personal interactions. During this time there were several times when the Israelites whined and complained and once in awhile even had full out rebellions. All of which were put down by God and Moses.
Eventually they reached the Promised Land, and Moses gave the people a long good-bye speech (all of Deuteronomy) which recapped their history, the laws God had given them, and then gave them both a prophecy of the future, and instructions on how to return to God's care when they had left it. Even then, even when the people were on the verge of their greatest success, God already knew that they would abandon Him, so He gave them a roadmap to find their way back.
Moses died, Joshua took up the reins of leadership, and the Israelites started invading Canaan, defeating their enemies along the way with few exceptions. In fact, the only times the people lost battles were when they disobeyed God's orders (Achan and the battle of Ai) or didn't seek his advice before moving forward (the Gibeonites). But as long as the Israelites were following God, they won all of their battles, every single one!
Look at the book of Judges. The people turned away from God to other gods, God took away His protection, another country came in and enslaved them, they cried out for help, God raised up a Judge, the Judge defeated the invaders, the people rejoiced and praised God, the people turned away from God, God took away His protection, etc, etc. That's pretty much the entire book of Judges!
David was said to be "a man after God's own heart" and used his power to unite the country and make them truly prosperous. He defeated the Philistines and the other area tribes, because God always had his back. Solomon, David's son, reaped the rewards of this and also ruled in peace. Rehoboam, Solomon's son, however thought that his power came from his crown, not from the Lord, and quickly alienated many of the tribes, separating the Jewish people into two countries: Israel and Judah. The books of 1 & 2 Kings and 1 & 2 Chronicles (the latter of which are essentially the politically correct re-issues of 1 & 2 Kings) tell of how both countries nearly competed with each other for most depraved, and before they knew it, they were not only fighting each other, but the surrounding countries were attacking them again.
Rather than return to God, the people continued to sacrifice their children to Molech, worship in forest shrines, and prostitute themselves in the Temple. They even turned God's Temple, His home in Jerusalem into a temple for Baal. The results were inevitable: first Israel and then Judah were conquered, their cities destroyed, their people taken into captivity. God had known this outcome was coming, that they would lose their place in this Promised Land before they ever set foot in it.
This truth, that we have to be right internally with God to be safe from external threats doesn't just apply to the Israelites three thousand years ago. It applies to marriage, to our families, to churches, and most of all, to us as individuals. If we aren't right with God, listening to Him, following His word, loving Him and living the life He's given us, we can and and should expect attacks from the outside! And Satan will attack us with discouragement, depression, or anger. Yes, we can also expect him to attack us when we are right with God, because he hates to see that. But when we're on the right track, God will protect us from the worst of it. You may think it's as bad as it can get, but you have no idea what God kept you from.
I see this in my own life, very clearly. The worst times in my life have come when I was farthest from God. This year I have faced some terrible days, because those I loved had stepped out from under the umbrella, but I know that I've made it through because of my relationship with God, because no matter what has come my way, I've turned to Him, and He has given me the strength to weather it through. He'll do the same for you. Turn to Him, pray to Him, and join me under the umbrella; there's always room for one more.