This is an interesting question, since the poem and the essay at first would seem so unrelated. They are, however, similar in that their protagonists are not the men they seem to be. Each of the protagonists lives an internal life that differs markedly from his external public life.
Richard Cory is presented in the poem as a man of wealth, grace, and style. He is admired by those who seem to be less fortunate, the poor who envy Cory's position in the world. They regard him from a social distance, as his wealth places him in a higher class. Cory's life bears no resemblance to their own. To those who "curse the bread," Cory lives a perfect existence. In truth, Cory's wealth has isolated him from human companionship, and his real life is so empty that he commits suicide. Richard Cory is not the man he appears to be.
In Orwell's essay, the narrator serves in a position of authority, representing the British Empire in governing the poor native population. He appears to be a man of strength whose power enables him to control the powerless. He strives hard to maintain this public image. However, he exercises his power from a deep sense of fear. He feels quite vulnerable in his position, frightened by the natives who generally fear him. Ironically, in enforcing English Colonial rule, he becomes its victim, as well, taking actions he does not want to take (killing the elephant), only because he must maintain his image of authority and invincibility. Like Richard Cory, he is not the man he appears to be.