To do this, you need three steps. First change the capsule at the beginning of the memory. Then the anesthesia mask needs to come off. Then while the doctor deals with that, you want to undo the strap. Ultimately David will be killed, and you'll be able to progress with the game.
To get a second achievement with the memory, you can also skip the capsule at the beginning, and then remove the anesthesia mask.