This Emerson statement appears in "Self-Reliance" which focuses on man's resisting the temptation to be a conformist. As Emerson rails against imitation and group thinking in his essay, he also positively focuses on the power of individualism. In order to be an individual, Emerson illustrates that man must guard his mind and thinking. He advises his reader to "trust thyself." Thus, if someone can be original and true to himself--not easily swayed by others' opinions--his mind will be similar to a temple or holy place which cannot be polluted.
Later in the essay, Emerson lists examples of men who had successfully guarded their minds' integrity--Pythagoras, Socrates, Jesus, Martin Luther, Copernicus, Galileo, and Newton. By considering that all of the men cited by Emerson were willing to die for (and some did) their individual thinking which went against the social norms of their day, you can more clearly understand Emerson's aphorism.