It was said of Ahithophel, that his counsel was as though one had consulted the Oracles of God.
HIS advice to Absalom, was basically:
Look, dude. Your Dad had to flee. He's bummed out, and understaffed. Launch a quick strike *now* and you can take him out, war over.
Following David's prayer, Hushai's advice (which is lousy advice) gets taken.
And when Ahithophel saw that his advice was not taken, he saddled his donkey, went home, set his affairs in order, and hanged himself.
Poor dude spends a lifetime giving good advice, ends up on the other side of the table from one of God's favorites, and gets curb stomped.
Moral: find out who God's homies are, and get in good with them. (You might suffer/get persecuted together. But at least you won't have the Almighty gunning for you...)