A brief summary of the selfconsistent field method leading to a four-i
ndex matrix dielectric function, as the one of the random phase approx
imation, for a quasi-two-dimensional electron gas is reminded. General
expressions for the form factor concerning electron-electron interact
ion in single heterostructures and quantum wells are derived when diff
erent dielectric constants on each side of an interface are considered
and, besides, the envelope functions in the confinement direction can
penetrate into the barrier regions. This problem is tightly connected
with numerical calculations for multisubband transport in inversion l
ayers and semiconductor heterostructures, as well as for other phenome
na in this kind of systems where screening of involved interaction in
intersubband scattering must be taken into account.