There's a significant difference between being desperate for God and being desperate for what God can offer. When we feel far from God, it is our desperation for him that bridges the gap. But our desperation for what we can get from him makes him seem even farther off. Saul is desperate for direction from God and leaves in the darkness, but David is desperate for God and is saved from the darkness.