Cahn François, Psychiatre à Montbéliard