"one who treats mental illness, 'mad doctor,' " 1864, from French aliéniste, from alienation in the sense of "insanity, loss of mental faculty," a sense attested in English from late 15c. (see alienate).
alienist al·ien·ist (āl'yə-nĭst, ā'lē-ə-)
n.
A physician accepted by a court of law as an expert on the mental competence of principals or witnesses.