Meckert Philippe, Psychiatre à Montbéliard