Both sides of the identity are $\mathbb P(X=Y)$, where $X$ and $Y$ are independent random variables with characteristic function $C$ and CDF $F$.
Note first that, for every $t$, $|C(t)|^2=\mathbb E(\mathrm e^{\mathrm it(X-Y)})$ hence, for any nonzero $T$, the term in the limit in the RHS is $ \mathbb E\left(\frac1{2T}\int_{-T}^T\mathrm e^{\mathrm it(X-Y)}\,\mathrm dt\right)=\mathbb E\left(\mathbf 1_{X=Y}+u(T(X-Y))\right),\qquad u(t)=\frac{\sin(t)}{t}\,\mathbf 1_{t\ne0}. $ When $T\to+\infty$, $u(T(X-Y))\to0$ almost surely, and $|u(t)|\leqslant1$ for every $t$ hence, by dominated convergence, the RHS of the identity is $\mathbb E\left(\mathbf 1_{X=Y}\right)=\mathbb P(X=Y)$.
On the other hand, let $v(x)=\mathbb P(Y=x)=\mathbb P(X=x)$ for every $x$. By independence of $X$ and $Y$, $\mathbb P(X=Y)=\mathbb E(\mathbb P(X=Y\mid X))=\mathbb E(v(X))=\mathbb E(v(Y))$. Writing $ v=\sum_{x\in A}v(x)\mathbf 1_{x},\qquad A=\{x\mid v(x)\ne0\}, $ one gets $ \mathbb P(X=Y)=\sum_{x\in A}v(x)\mathbb E(\mathbf 1_{X=x})=\sum_{x\in A}v(x)\mathbb P(X=x)=\sum_{x\in A}v(x)^2, $ which is the LHS of the identity.