late 13c., "disordered in intellect, demented, crazy, insane," from Old English gemædde "out of one's mind" (usually implying also violent excitement), also "foolish, extremely stupid," earlier gemæded "rendered insane," past participle of a lost verb *gemædan "to make insane or foolish," from Proto-Germanic *gamaidjan, demonstrative form of *gamaidaz "changed (for the worse), abnormal" (source also of Old Saxon gimed "foolish," Old High German gimeit "foolish, vain, boastful," Gothic gamaiþs "crippled, wounded," Old Norse meiða "to hurt, maim").
This apparently is from the Germanic intensive prefix *ga- + PIE *moito-, past participle of root *mei- (1) "to change, go, move" (source also of Latin mutare "to change," migrare "to change one's place of residence"). In Middle English usurped the place of the more usual Old English word, wod (see wood (adj.)).
The meanings "beside oneself with excitement or enthusiasm, under the influence of uncontrollable emotion" and "enraged, furious, beside oneself with anger" are attested from early 14c., but the latter was deplored by Rev. John Witherspoon (1781) as an Americanism. It now competes in American English with angry for this sense. Of animals, "affected with rabies, furious from disease" from late 13c.
To do something like mad "recklessly, as if mad or crazy" is by 1650s. Phrase mad as a March hare is attested from 1520s, via notion of breeding season; mad as a hatter is from 1829 as "demented," 1837 as "enraged," according to a modern theory supposedly from erratic behavior caused by prolonged exposure to poison mercuric nitrate, used in making felt hats. For mad as a wet hen see hen.
Mad money, which a girl carries for use in getting home when she and her date have a falling out, is attested by 1922; mad scientist, one so eccentric as to be dangerous or evil, is by 1891. Mad Libs, the word game (based on the idea in consequences, etc.), was first published in 1958