This seems kind of obvious but this method has worked wonders for me and as I still see a lot of people dying from lag (or at least claiming to) I think it would be nice to share.
A little about myself and the game; I play on the EU server from Asia, I very often have extreme lagspikes that lasts several minutes and usually ends up with disconnecting, I have been testing this out on purpose with lower level hardcore characters trying to find a good way to avoid death.
-When you notice that your game is starting to lag, be it by swinging your weapon and doing no damage or whatever, it should be easy to spot, hit the Esc button.
You can tell that your cooldowns and mobs/animations will keep going on in the background, however the game will eventually stop and "rewind" back to the moment you press the Esc button.
Example of a lagspike (in seconds):
:32 - enter combat and swing that mighty sword of yours
:40 - you will notice that you stop dealing damage even though the animations are continuing
:41 - Esc
:42-XX - you will see that cooldowns continue to fall and mobs will keep moving, but here is the good part, all of this will be "rewound" to the point you hit you Esc button.
It pays off having patience, even though your game will catch up and eventually freeze and pause, the lag might not be over just yet.
I tried seeing if there was a way to avoid death even further and while I have not done intense testing yet, my first 2 tries have been successful, but I think that would be too low to confirm as working, however here is what I did:
Got to low hp, 5% or so, simulating an upcoming death
Wait for a lagspike to kick in while fighting/kiting a bunch of mobs (these usually last several minutes for me)
Hit Esc and wait..
Wait some more
-And you will get disconnected eventually (first try took 30 minutes second took 1 hour or so)
I then logged back in and were alive
While this could be pure luck/coincidence I really doubt it, as I were in combat with 5+ mobs and never got above 5% hp.
(As you could imagine this took around 10 hours to test for the 2 tries, waiting for an upcoming lagspike is quite hard to plan)
I hope this will be of help to some people, it sure helps me stay up in a1 inferno on my hc barb :-)