Analysis of the generalized separation of variables method in the electrostatic case