While on one hand what happened could be considered poetic justice, the officer should be terminated. Two wrongs don't make a right.

Had this happened with a normal police officer (leaving a suspect handcuffed somewhere while running off to catch another perp, for example) or the individual had died while being beaten by the mob, people would be screaming for the cop's head.