Hermes starts performance reviews so that he may rid Planet Express of its worst employee, implying that this will be Zoidberg.
He fires himself and has the Central Bureaucracy replace him with a robot to handle the accounting for Planet Express.
Eventually, he replaces all his human parts except his brain, proves he is more valuable than the robot put in his place, and returns to the Planet Express crew.
For the procedure to work, Hermes locks his family and the Planet Express crew in the lab until Farnsworth completes the transplant.
Hermes comes back to life in his original body, realizing that he gave up his humanity for the pointless pursuit of perfectionism.