A method is presented for reducing general two-loop self-energies to s
tandard scalar integrals in massive gauge theories with special emphas
is on the electroweak Standard Model (SM). We develop a technique for
treating the tensor structure of two-loop integrals appearing in self-
energy calculations. It is used together with the symmetry properties
of the integrals to obtain a result in terms of a small number of stan
dard scalar integrals. The results are valid for arbitrary values of t
he invariant momentum p2, all particle masses, the space-time dimensio
n D and the gauge parameters xi(i) (i = gamma, Z, W). The algebraic st
ructure of the results clearly displays the gauge dependence of the co
nsidered quantities and allows us to perform very stringent checks. We
explicitly verify Slavnov-Taylor identities by calculating several th
ousand Feynman diagrams and adding them up algebraically. As an applic
ation of our algorithm we calculate the light fermion contributions to
the two-loop gauge boson self-energies of the electroweak SM. We stud
y their gauge dependence and discuss the occurring standard integrals.