I am wondering if there is a reason given (as of the end of season 1) for why the Mad Hatter is aware of the curse. It's clear that Rumpelstiltskin and the Evil Queen are aware because they are co-conspirators of the curse and singled themselves out. So, was there a reason to keep the Mad Hatter aware, or is he aware because of who he is? Also, why is his daughter not aware?
The point of the curse was to take away everyone in fairy tale land's happiness. For most people that meant stripping all of their memories of the happy, magical place they lived, and force them to live mundane lives without knowing the people they loved. Note that very few people in Storybrooke (before Emma arrives) can claim to be happy with their lives; at best they are stuck in an unsatisfied rut, and at worst are completely miserable.
For Mad Hatter, though, the curse could do worse than just make him forget. It allowed him to remember that place, and his old life, and specifically the daughter that did not remember him. He also remembered the power he used to have (via his hat) and knew he could never have it again. He also knew that, if he told anyone the truth, the curse would make them refuse to believe him, and just assume he was crazy.
(From an out-of-universe perspective, this fits very well with the Mad Hatter theme: what is more crazy that a regular person claiming to be the Mad Hatter?)
Note that this is similar to what happened to Maleficent: she was not turned into a normal, non-magical human that forgot her true identity, because that wouldn't have been enough. She was kept in her dragon form, presumably well aware of who she was but unable to do anything about it.
Its because the mad hatter is from Wonderland, not the enchanted forest. The curse has affected him differently.
I had assumed that it was a manifestation of his own personality in the Real World. If we consider that all of the characters' essential natures are transferred over into Storybrooke (so for example the deal making Rumplestiltskin becomes Mr Gold, the pawn shop owner and landlord, a reflection of his fairy tale nature as a maker of bargains and doer of devil's deals within a real world context).
The Mad Hatter's essential nature is Mad, and his belief in the existence of the fairy tale world clearly renders him "mad" within the context of the real world, and this is how Emma, being immersed in the real world perspective, clearly views him in this episode.
I believe he was trapped in wonderland during the carrying out of the curse. Remember when she left him there and took his hat? Well in storybrooke, she says something that stuck out to me..."when I brought you here" which makes me think she brought him there afterward and while he was in wonderland he was shielded from the curse.