I apologize for sounding as if I'm omniscient. Only God can claim that. But the fact remains that I've never been lost in the woods.
What I did was prepare. During the times that I was hunting, prospecting, backpacking, and, later hiking (a good part of) the Appalachian Trail, I always had a map, compass, and survival supplies. I oriented myself to the general directions the rivers and streams ran, so as a last resort I could follow one of them "somewhere". In the Lower 48, I checked for big-city airports in case I needed to see which way the big birds were generally flying. In Alaska, I checked with the bush pilots to see if they flew any regular routes over the area I would be in.
Even today, at an age when I no longer hunt or backpack, and the most adventurous thing I do is hike through the forest looking for artifacts and fossils, I always pack a compass and map and survival supplies (and now a cell phone). I don't use GPS.