Bivariational calculation of complex resonance energies