Parts of your description sound like "Spook," a short story by Bruce Sterling (published in "Crystal Express" with several other Shaper/Mechanist stories and a few fantasy stories).
I'm too lazy to go dig my copy out, an online summary says that
In "Spook," the earth has suffered a "brain drain" through mass emigrations to space leaving a world populated mainly with "undesirables." The powers-diat-be have their hands full trying to maintain a semblance of order and control; faced with a potential uprising in Central America, they contract the services of a futuristic secret agent - the "spook" of the title - to quell the insurgency. The denouement to this space-age thriller is devasting.
The spook has some sort of implant that represses his memory and most of his feelings. He's infected with a tailored virus and heads to the jungle to deal with a popular uprising that threatens the powerful corporations. There,
he runs into another spook who's had her implant removed. She gets the drop on him, they remove his implant and when he wakes up in a hospital he remembers other assignments he's been sent on where he was basically programmed to massacre groups the corporations don't like. He appears to be on his way to joining the insurgency.
Then the story jumps to the spook being back in the office of the guy who dispatched him, explaining what happened and it turns out,
that despite having the implant removed, he still wipes out everyone involved in the uprising because he's too far gone and wants the implant back so he can stop feeling and remembering things.
(I don't know if devestating is the word I'd use, but there is a pretty awesome twist in the story that I haven't included.)