Carpentier Alain, Psychiatre à Valentigney