Sounds like you made some good decisions in finding your way out of a bad situation. I think it's difficult not to feel some degree of panic when you're suddenly disoriented. I've found that secret is not to make rash decisions and stay put until you calm down and are able to make logical choices.
Having at least one decent map and a compass will always be essential. As someone pointed out it's also fun to navigate with a map and compass plus it gives you a historical connection to those who have used a map and compass over many past generations.