W.M.H. de Ruijter, Psychiater