How can one obtain the same-spin and opposite-spin terms of the MP2 energy by integrating out the spin?

Just as specified on the psi4 website here: <https://psicode.org/psi4manual/master/dfmp2.html>, the Moller-Plesset Perturbation Theory states that the second order correction to the ground state energy, $E\_0^{(2)}$, is given by
$$E\_0^{(2)} = \sum\_{i<j}\sum\_{a<b} \frac{\left|\,[ia\|jb]\,\right|^2}{\epsilon\_i - \epsilon\_a + \epsilon\_j - \epsilon\_b} = \sum\_{i<j}\sum\_{a<b} \frac{\left( [ia|jb] - [ib|ja]\right)\left( [ai|bj] - [bi|aj]\right)}{\epsilon\_i - \epsilon\_a + \epsilon\_j - \epsilon\_b}\, ,$$


where $[ia\|jb]$ is the antisymmetrized two-electron integral over spin-orbitals and $\epsilon$ are the different orbital energies. As far as I know, one can integrate out the spin variable, $\sigma$, of said integrals in the following way:
$$\int\int d\omega\_1 d\omega\_2 [ia|jb] = \int\int d\omega\_1 d\omega\_2 \sigma\_i^\*(\omega\_1)\sigma\_a(\omega\_1)\sigma\_j^\*(\omega\_2)\sigma\_b(\omega\_2) (ia|jb) = \delta\_{\sigma\_i,\sigma\_a}\delta\_{\sigma\_j,\sigma\_b}(ia|jb)\,,$$


thus obtaining chemist’s integrals over spatial orbitals, $(ia|jb)$. Following this path, $E\_0^{(2)}$ can be divided into a same-spin, $E\_{0,SS}^{(2)}$, and an opposite-spin, $E\_{0,OS}^{(2)}$, terms by integrating the spin out such that
$$E\_{\rm 0,\,SS}^{(2)} = \sum\_{ij}\sum\_{ab}\frac{(ia\mid jb)[(ia\mid jb) - (ib\mid ja)]}{\epsilon\_i - \epsilon\_a + \epsilon\_j - \epsilon\_b}\, ,\qquad
E\_{\rm 0,\,OS}^{(2)} = \sum\_{ij}\sum\_{ab}\frac{(ia\mid jb)(ia\mid jb)}{\epsilon\_i - \epsilon\_a + \epsilon\_j - \epsilon\_b}\,.$$


By doing this, I was able to get the expresion for $E\_{0,OS}^{(2)}$ without much trouble. However, when trying to perform the integration for same spins, I haven't been able to get rid of one of the terms and get the expresion I want (which has three terms only). This happens because all four orbitals have the same spin function, so every term should mantain after the integration. I haven´t been able to find ways to get these expressions without just using algebra like many demonstrations have.


