Thus, my friend you have learned two valuable lessons.
1) Do not venture into random branches of a super cave if you are not intricately aware of your surroundings/exit route at all times.
2) That you should always, always, ALWAYS bring either 5 stacks of torches plus /planks/sticks/logs/etc. for making torches on the fly with the coal you've found.
A tip, It helps to place a foreign block down in a maze-like cavern to lead yourself back to key points. (sand or sandstone is a great one, since the colour is different and it couldn't spawn naturally deep underground.)
I've never managed to get lost when spelunking. I just have an innate sense of exactly where my exit/mining outpost is from where I am.
Thanks to everyone that left a comment! I'm glad my adventure/nightmare entertained you. I will definitely be taking a lot of emergency materials (like wood) when I go mining and spelunking now. Also, the idea of placing foreign blocks was a nice suggestion, I'll be using that.
I continue to see use of a lot of extra wood when mining. I definitely need to get into this habit, it seems to be a necessary one. I usually just bring along what I feel is needed; however, as some may have noticed, I can get sidetracked fairly easily, causing me to run out of materials. Thanks again for the replies, everyone. I hope newbies take a look at this to try and avoid incidents like these altogether.
That feeling, though, when you manage to find your way back to a torch and track back up to the surface... It's a great feeling. First time it happened to me I popped out to a sunrise. It was pretty magical.
One day, I was playing with a magma cube on my server. I was jumping backwards taunting it. But earlier that day i punched a pigmen. And one snuck behind me and knocked me in lava. I lost a lvl 30 enchanted diamond pick, a diamond sword, 64 steak, a full set of iron armor, and tons of glowstone.
My experience today was crazy. I needed wood in my mine, so i left my diamonds and everything in a chest, and went to find my way out, but i didn't recognize any of the landmarks. I got lost, fell in lava, and died. I was ticked, and wandered around the spawn. I found an NPC village, and i started a mine next to it. Soon i came to a cave, and i explored it. I fell through a hole in the floor, and landed on a torch. It was my old mine! I was able to take all my diamonds and ores back to the surface, and i'm now the happy ruler of an NPC village.