If he loses the election, he might be fired by whoever the governor appoints. Which would be fitting since he fired Frieda Black.
"If not, can't he simply return to being an ADA?"
He might just begin his senate campaign, based on the notion that he was thrown out by white privilege; and that he has proven that he can be trusted to defend the AA community.
But most likely he would keep his pension, even if he's fired, so long as he's vested, which of course he is.