If an animagus is transformed and then dies, does that person transform back into the original person or do they remain forever the animal they transformed into?
Killing an animagus (almost certainly) returns them to their human form.
The harsh cry startled the fox, now crouching almost flat in the undergrowth. It leapt from its hiding place and up the bank. There was a flash of green light, a yelp, and the fox fell back to the ground, dead.
The second figure [Bellatrix] turned over the animal with its toe.
‘Just a fox,’ said a woman’s voice dismissively from under the hood. ‘I thought perhaps an Auror – Cissy, wait!’
Harry Potter and the Half Blood Prince
As far as I can recall, no animagus dies in their transformed state in the books.
However, when Sirius is attacked by the Dementors, he is returned to human form during the process, which might go some way:
But then, out of the darkness, they heard a yelping, a whining; a dog in pain ...
'Sirius,' Harry muttered, staring into the darkness.
The yelping stopped abruptly. As they reached the lake's shore they saw why - Sirius had turned back into a man. He was crouched on all fours, his hands over his head.
'Nooo,' he moaned. 'Noooo .... please ...'
And then Harry saw them. Dementors, at least a hundred of them, gliding in a black mass around the lake towards them.
Harry Potter and the Prisoner of Azkaban - p.280 - Bloomsbury - Chapter 20, The Dementors' Kiss
Admittedly, though, this passage is open to interpretation. He may have transformed deliberately, but it's hard to see what manner of protection this would provide him. He was wandless at this point, humans are less agile, less quick across the ground than dogs, and they are the expected form of the victim for a Dementor.
And yet, the Dementors don't appear to have actually reached him before he transformed, however, Sirius was already in trouble before Harry saw the Dementors and the implication (to my mind) is that the Dementors were swarming, on the attack, chasing down their prey. Sirius was already begging before Harry noticed the Dementors; they appear to be the source of his anguish.
Another possibility is that Dementors cause people to transform, not fatal attacks. And yet, Sirius was able to transform into a dog in Azkaban and escape some of their baleful influence - and, ultimately, escape them altogether. Although, at no point during his stay at Azkaban were they approaching to kiss him.
Also, since Dementor's kisses are not fatal per se, you might disregard this evidence, but it's the only near-fatal attack on a transformed animagus I can recall in the books, so it's the best canon information I can give you.