Comparon Frédéric, Psychiatre à Nice