light in the darkness; godsend; guiding beacon
Metaphorical set phrase for something or someone that brings hope, relief, or guidance in a desperate situation. Often used in literary or rhetorical contexts.
His advice was truly a light in the darkness.
This one book became a guiding beacon for me.