Self energy of metallic and heavy electrons due to electron-phonon interaction and superconductivity in a heavy fermion system