i think he was not insane it cant just be that he "imagined" the woman he met in the cave
and at the beginning he was on ship smoking and at that moment the other bad cop gave him one of these drugged cigarettes made him think he was crazy
and in the end he said a pretty cool sentence "which would be worse to live as a monster and die as a good man" maybe he was just acting to be crazy to get killed because he got a bad conscience of murdering his wife
Leonardo Di Caprio is a pretty good actor but his old movies were more woman movies (titanic, romeo and Juliet) but his new one are awesome (the departed, blood diamond, shutter island, inception and so on)