The Spy Who Came in From the Cold by John le Carré
Alex Leamus is a a British spy working in East Berlin. He's just lost his last operative. So he decides it's time to retire. But the bosses want him to do one more job. That's to take down a particularly vicious German agent.
So the stage is set to look like he is self-destructing. He begins a desk job at the agency but is fired because of thefts. He gets a job in a library, a cheap boarding house room and begins drinking. He then assaults a local grocer and lands in jail.
So naturally the East-Germans begin to try to turn him into a double-agent. Once he's taken to East Berlin, he has to call on all his experience to stay alive.