First of all, backup your world directory so you can try things over and over again. (Although you should remember that you might spent more time trying to rescue yourself than you'd need to get your stuff again)
Then set the difficulty to peaceful which slows your dying (but doesn't prevent it!). Now if you have some blocks in your inventory on a hotkey, after unpausing immediately look down, switch to the blocks and hold SPACE (jump) and hold right click. If you're lucky this is fast enough to build a tower out of the lava (which is hopefully not too deep). You'll still be burning, which doesn't kill you on peaceful, but if you have a bucket of water put that on the side of your tower to get a small waterfall which also obsidianizes the lava below. Good look!
Alternatively you can use a map tool to change the lava pool you're in into water, but that would really be cheating.
Invisible parts: Under each orange block is a sticky piston facing up. The left black-framed block is a furnace with 14 items in it (acting as a signal source), and the right black-framed block is the dispenser with a lava bucket.
How it works: The input signal comes from the left. The orange block and sticky piston turn the signal into a pulse (a “monostable”, or rising-edge detector) for the dispenser. The right comparator's signal indicates the decreased fullness of the dispenser (empty buckets stack more than full ones), allowing the torch to turn on, which signals the right monostable to produce a second pulse to remove the lava. If a longer burning-in-lava time is desired, lengthen the repeater delay on the right.
It would be possible to simply produce two pulses from the input by delaying the monostable signal; the advantage of this design is that it is self-correcting if the lava is in the wrong state, because the second lava-removing pulse is generated by the dispensing of the lava. However, doing it the other way does have the advantage of needing no quartz.
This design is derived from my zombie damager, which is a continuous flow system. If you want to have this machine automatically trigger when mobs arrive in it, you could add a tripwire above the lava in the same way as that mechanism does. (The main wiring here is different from there because that machine removes the lava, rather than adding it, when a mob arrives, but the tripwire can be connected to the input in the same way.)
Finally, note that chickens are tricky because they have so little health. Specifically, even with a different pulse circuit built for absolute minimum delay, chickens standing where the lava goes seem to take enough damage to die instantly, burning their items in the lava. However, if the chicken is on a slab underneath the lava (thus being slightly lower), then it sometimes survives long enough to die after the lava disappears, and its drops will sometimes survive even if it dies instantly. (Strange that that makes a difference.) Based on this result, I recommend using something other than lava for chickens.
Tested in Minecraft 1.6.2.
Best Answer