Unfortunately, I’ve been in exactly that type of situation too. It’s a weird simultaneous feeling of absolute panic and clear-headed “holy shit, how did I do this to myself?”
Now that I think about it, two different times, and two different dangers, 16 years apart. Whew.