Douglas goes out of consciousness; and as soon as he does, the movie picks up as if he's really an agent and needs to save Mars.
Another way to take it — is that the whole thing really happened as a schizophrenic embolism, or whatever the female doctor said it was, moments after he gets put to sleep.
Is it really a Total Recall dream or did something really go wrong with the procedure?