For hit points lost due to level draining, if it was between levels where the victim got a fixed number of hit points (say a 13th level fighter being drained to 11th level), the math was easy. He loses 3 hp/level drained, so he's now down 6 hp total. For those who are lower level and who are still rolling HD to determine hp, I've generally gone with simply rolling the appropriate dice (10-sided for fighters, 8-sided for priests, etc) and subtracting however many hp were indicated (plus any applicable CON bonus). It was always a pain in the ass to keep track of how many hit points each character gained each tie he went up in level. Plus, I like the idea that the PC could come out ahead or behind his original totals after re-gaining levels. I chalked it up to variances on how powerful the drain was. Perhaps the PC who started with 30 hp, got drained a level and lost 5 hp, then went up a level and rolled just 3 hp (for a net loss of 2 hp) was scarred more deeply by the draining than the PC who started with 30 hp, got drained a level and lost 5 hp, then leveled up and rolled 7 hp (for a net gain of 2 hp). Perhaps the former PC was at a weaker state at the time he was drained than the latter PC. To me it seemed more realistic or at least more believable. It wasn't like the hp were set in stone. In game terms, we're talking about the life force of a character. And things like that aren't exact math. Some weather the storm and come out stronger, some are more deeply affected and come out weaker than before.
For spells lost, I usually just rolled randomly. It seemed to be the best way. It's like going into shock and only remembering random events during the attack.