I'm not certain if this was a novel or just a short story/novella, but it was a near-future cyberpunk sort of setting. At a guess I would have read this sometime between 2005-2015, but I'm not certain of that.
In the scene in question the protagonist is present while a team of forensic medics are working on the body of a young man that had been murdered, attempting to revive him from death long enough to interrogate him about his killer. They make use of a cocktail of various drugs, life support equipment, and engineered medical worms to brute-force his metabolism back into functioning.
The process works, but does not go as planned. As part of the process the medics were supposed to disable the victim's ability to see, allowing the interrogators to question the victim without them being able to see what was done to them and thus know that their revival is only temporary and brief. This wasn't done correctly and the victim sees what's been done to them, and the interrogators are unable to glean any useful information from them as the trauma sends them into a panic.