Mathematically, how does the exchange integral for a closed-shell system reduce to zero?
Let's do the math as explicit as possible. So, the exchange integral is defined as follows,
$$
\langle \chi_1(1) \chi_2(2) \lvert r_{12}^{-1} \rvert \chi_2(1) \chi_1(2) \rangle
:=
\sum\limits_{m_{s1}=-1/2}^{+1/2}
\sum\limits_{m_{s2}=-1/2}^{+1/2}
\iint\limits_{-\infty}^{+\infty}
\bar{\chi}_1(\vec{x}_1) \bar{\chi}_2(\vec{x}_2)
r_{12}^{-1}
\chi_2(\vec{x}_1) \chi_1(\vec{x}_2)
\mathrm{d} \vec{r}_1 \mathrm{d} \vec{r}_2 \, ,
$$
where I used a more appropriate label for the spin coordinate ($m_{s}$) as well as distinguished between summation over discrete variables $m_{s1}$ and $m_{s2}$ and integration over continuous $\vec{r}_1$ and $\vec{r}_2$ ones.

Then, for the restricted spin orbitals,
$$
  \chi_1(\vec{x}_1) = \psi_1(\vec{r}_1) \alpha(m_{s1}) \, , \\
  \chi_2(\vec{x}_2) = \psi_1(\vec{r}_2) \beta(m_{s2}) \, ,
$$
where $\alpha$ and $\beta$ are the so-called "spin up" and "spin down" spin functions defined as follows,
$$
    \alpha(m_{s}) =
    \begin{cases}
        1, &amp; m_{s} = +1/2 \\
        0, &amp; m_{s} = -1/2
    \end{cases} \, ,
    \quad
    \beta(m_{s}) =
    \begin{cases}
        0, &amp; m_{s} = +1/2 \\
        1, &amp; m_{s} = -1/2
    \end{cases} \, ,
$$
we get then 
$$
\langle \chi_1(1) \chi_2(2) \lvert r_{12}^{-1} \rvert \chi_2(1) \chi_1(2) \rangle \\
=
\sum\limits_{m_{s1}=-1/2}^{+1/2}
\sum\limits_{m_{s2}=-1/2}^{+1/2}
\iint\limits_{-\infty}^{+\infty}
\bar{\psi}_1(\vec{r}_1) \alpha(m_{s1})
\bar{\psi}_1(\vec{r}_2) \beta(m_{s2})
r_{12}^{-1}
\psi_1(\vec{r}_1) \beta(m_{s1})
\psi_1(\vec{r}_2) \alpha(m_{s2}) \\
=
\sum\limits_{m_{s1}=-1/2}^{+1/2}
\sum\limits_{m_{s2}=-1/2}^{+1/2}
\alpha(m_{s1}) \beta(m_{s2}) \beta(m_{s1}) \alpha(m_{s2})
\iint\limits_{-\infty}^{+\infty}
\bar{\psi}_1(\vec{r}_1) 
\bar{\psi}_1(\vec{r}_2) 
r_{12}^{-1}
\psi_1(\vec{r}_1) 
\psi_1(\vec{r}_2) \, ,
$$
where we used the fact that spin functions $\alpha$ and $\beta$ are real-valued, so that $\bar{\alpha} = \alpha$ and $\bar{\beta} = \beta$.

At this point we could concentrate our attention exclusively on the coefficient in front of the double integral above, since we could show that it is equal to zero, so that the whole expression vanishes irregardless of the value of the integral. So, the coefficient can be written as follows,
$$
\sum\limits_{m_{s1}=-1/2}^{+1/2}
\sum\limits_{m_{s2}=-1/2}^{+1/2}
\alpha(m_{s1}) \beta(m_{s2}) \beta(m_{s1}) \alpha(m_{s2}) \\
=
\alpha(-1/2) \beta(-1/2) \beta(-1/2) \alpha(-1/2)
+
\alpha(-1/2) \beta(+1/2) \beta(-1/2) \alpha(+1/2) \\
+
\alpha(+1/2) \beta(-1/2) \beta(+1/2) \alpha(-1/2)
+
\alpha(+1/2) \beta(+1/2) \beta(+1/2) \alpha(+1/2) \\
= 0 + 0 + 0 + 0 \\
= 0 \, ,
$$
where all the terms vanish due to at least either $\alpha(-1/2) = 0$ or $\beta(+1/2) = 0$, so that we indeed get
$$
\langle \chi_1(1) \chi_2(2) \lvert r_{12}^{-1} \rvert \chi_2(1) \chi_1(2) \rangle
=
0 \, .
$$



It can be noted that there is a shortcut in proving that the coefficient above is zero that uses the defining properties of spin functions. First, we could rearrange spin functions as follows,
$$
\sum\limits_{m_{s1}=-1/2}^{+1/2}
\sum\limits_{m_{s2}=-1/2}^{+1/2}
\alpha(m_{s1}) \beta(m_{s2}) \beta(m_{s1}) \alpha(m_{s2})
=
\sum\limits_{m_{s1}=-1/2}^{+1/2}
\alpha(m_{s1}) \beta(m_{s1})
\sum\limits_{m_{s2}=-1/2}^{+1/2}
\beta(m_{s2}) \alpha(m_{s2}) \, .
$$
Secondly we note that by the very definition of $\alpha$ and $\beta$ presented above,
$$
  \sum\limits_{m_{s}=-1/2}^{+1/2}
  \alpha(m_{s}) \beta(m_{s})
  =
  \alpha(-1/2) \beta(-1/2) + \alpha(+1/2) \beta(+1/2)
  =
  0 \cdot 1 + 1 \cdot 0
  =
  0 \, ,
$$
which is already enough to establish that the whole exchange integral vanishes. The same is, of course, true for the second factor as well,
$$
  \sum\limits_{m_{s}=-1/2}^{+1/2}
  \beta(m_{s}) \alpha(m_{s})
  =
  \beta(-1/2) \alpha(-1/2)
  +
  \beta(+1/2) \alpha(+1/2)
  =
  1 \cdot 0 + 0 \cdot 1
  =
  0 \, .
$$
It is also quite customary to use Dirac bracket notation for such expressions over spin orbitals, so that one could write these findings concisely as
$$
  \langle \alpha \lvert \beta \rangle
  =
  \langle \beta \lvert \alpha \rangle
  =
  0 \, ,
$$
where $\langle \alpha \lvert \beta \rangle$, for instance, is defined as follows,
$$
  \langle \alpha \lvert \beta \rangle
  :=
  \sum\limits_{m_{s}=-1/2}^{+1/2}
  \bar{\alpha}(m_{s}) \beta(m_{s}) \, .
$$
In general, for two spin functions $\gamma_1$ and $\gamma_2$, expression $\langle \gamma_1 \lvert \gamma_2 \rangle$ defined as follows,
$$
  \langle \gamma_1 \lvert \gamma_2 \rangle
  :=
  \sum\limits_{m_{s}=-1/2}^{+1/2}
  \bar{\gamma_1}(m_{s}) \gamma_2(m_{s}) \, ,
$$
is zero if the functions correspond to different spin states and one otherwise which can be expressed as follows,
$$
  \langle \gamma_1 \lvert \gamma_2 \rangle
  =
  \delta_{\gamma_1 \gamma_2} \, .
$$



Finally, I would like to make a short comment on "integrating" over discrete spin coordinates rather then summing up over it. One could indeed define
$$
  \langle \gamma_1 \lvert \gamma_2 \rangle
  :=
  \int \bar{\gamma_1}(m_s) \gamma_2(m_s) \mathrm{d} m_s \, ,
$$
and then think of integration over discrete $m_s$ variable being reduced to summation. But the integration here is just a "symbolic shorthand" since, strictly speaking, we have a summation over discrete $m_s$ variable from the get go. We could just symbolically write it down as an integration as well, if we think it looks more cute for some reason.

In exact same way the exchange integral can also be symbolically defined as follows,
$$
\langle \chi_1(1) \chi_2(2) \lvert r_{12}^{-1} \rvert \chi_2(1) \chi_1(2) \rangle
:=
\iint
\bar{\chi}_1(\vec{x}_1) \bar{\chi}_2(\vec{x}_2)
r_{12}^{-1}
\chi_2(\vec{x}_1) \chi_1(\vec{x}_2)
\mathrm{d} \vec{x}_1 \mathrm{d} \vec{x}_2 \, ,
$$
where the "integration" is informally done over joint spin-spatial coordinates of the electrons. And again, strictly speaking, a summation is done over the spin coordinates and an integration over spatial ones, as it is written explicitly in the very beginning of the answer.