Finite calculation of divergent self-energy diagrams