Resolution of some mathematical problems arising in the relativistic treatment of the S states of three-electron systems