He's insane; he is not a troubled hero. The whole movie is about how the media glorifies psychopaths.
A private eye and a snoop with a heart of gold, Jake (as his friends call him) Gittes is the protagonist of the acclaimed neo-noir Chinatown. Portrayed by Jack Nicholson, he as a man of some honour who emerged from the grime of the eponymous LA Chinatown crushed and hopeless. But, he returns to the seedy place he once knew to try to save a woman in need. He's beaten-down, but finds one last opportunity to do some good in the world, and take on moral and fiscal corruption.