Local-potential approximation for the Brueckner G matrix and problem of optimally choosing model subspace