Trust Your Eyes by Linwood Barclay
A schizophrenic man spends his days and nights on a website called Whirl360, believing he's employed by the CIA to store the details of every town and city in the world in his head.
Then one day, he sees something that shouldn't be there: a woman being murdered behind a window on a New York street.
Suddenly Thomas has more to deal with than just his delusions, as he gets drawn into a deadly conspiracy.