This question already has an answer here:
No, actually I didn't, but that was a close call and I'm really curious how would one go about that one.
On my third or fourth visit to the Nether, I still didn't realize the risk, and didn't place marks that would help me get back to the origin (currently I like to use flint and iron to create big flaming arrows towards the exit, visible from afar.) I wandered past one hill, and then I couldn't locate the place I came from. I wisened up and started placing marks in form of torches, towers of netherrack with glowstones on top etc. The bunch of wood I had in my stash has proven invaluable as I ran out of steaks, and had to craft a bowl and start making mushroom soup. I realized the fastest way back would be to simply die, but since I had no clue where I was, that would mean losing my quite precious equipment, which cost me a lot of time and effort to gather and enchant, for that trip specifically. I also knew I had traveled rather far from the portal before starting placing marks, so the chances of finding it again by going in any random direction were rather slim.
By sheer luck I found one of the caverns I had explored before, and found my way back, but that was really a close call and I'd prefer to know any hints what to do in Nether if you're already lost (no Obsidian to build a new portal, not willing to die and forgot the direction to the exit.)