Coherent states and completeness Consider one possible definition of a Gaussian (coherent) state in the position representation
$$ \langle r | \psi(r_i,p_i) \rangle = \left( \frac{ 2 \gamma}{\pi} \right)^{\frac{1}{4}} \exp \left[ -\gamma (r-r_i)^2 + i p_i(r-r_i) \right] \, .$$
It can be proved that 
$$ \tag{1} \frac{1}{2\pi} \int dr_i dp_i | \psi(r_i,p_i) \rangle \langle \psi(r_i,p_i) | = \hat{1} \, .$$
Take the absolutely true equation
$$ \langle r | r' \rangle =\delta(r'-r) \, ,$$
insert the unity operator expressed using coherent states on the LHS:
\begin{align}
 \langle r | r' \rangle &= \tag{2} \frac{1}{2\pi} \int dr_i dp_i \langle r | \psi(r_i,p_i) \rangle \langle \psi(r_i,p_i) | r' \rangle \\
&= \delta(r'-r) \exp\left[ -\frac{\gamma}{2} (r'-r)^2 \right] \\
&\neq \delta(r'-r) \, ,
\end{align}
An absurd. I'm assuming something that isn't true. What is it?
 A: You did all right, but you forgot about delta function's property.
$$ 
\delta(x)f(x) = \delta(x)f(0) \, . 
$$
That's correct for every smooth function (it is hard to tell what $\theta(x)\delta(x)$ is, but there is a way to define it too). Physicists usually explain it superficially.
Therefore
$$ 
\delta(r'-r) \exp \left[-\frac{\gamma}{2}(r'-r)^2 \right] = \delta(r'-r).
$$
To see where this property comes from let me remind you definition of Dirac's $\delta$-function.
Physicists like to use Dirac's definition:


*

*$\delta(x) = 0, \, |x| > 0$

*$\int\limits_{-\infty}^{+\infty}\delta(x)dx = 1$.


Which is quite strange, since integral doesn't care about null sets. No matter whether you have Riemann or Lebesgue integral, first property implies $\int_{-\infty}^{+\infty}\delta(x)dx = 0$. Physicist also like to write $\delta(0) = +\infty$, which is even more stranger. There are two ways to face these contradictions. Mathematicians say $\delta$-function is no function. It is a functional or, to be more precise distribution (see below). Physicists hovewer imagine it as a smooth function, such that $\delta(x) = 0, \, |x| > \varepsilon$, where $\varepsilon$ is much less than any other size you have (e.g. you can read Feynman Noble Prize lecture where he uses it explicitly) and property 2 holds.
Often (e.g. when you do Fourier transform) it is enough to think that 
$$
\int\limits_{-\infty}^{\infty} \frac{dp}{2\pi}e^{ixp} = \delta(x).
$$
But such integral simply doesn't exist. So it is bad definition of $\delta$-function. Correct way to understand that identity is as a limit
$$
\lim\limits_{\epsilon \to +0} \left[\int\limits_0^{\infty} \frac{dp}{2\pi}e^{ixp-\epsilon p} + \int\limits_{-\infty}^{0} \frac{dp}{2\pi}e^{ixp+\epsilon p}\right] = \frac{1}{2\pi}\lim\limits_{\epsilon \to +0} \left[\frac{1}{\epsilon-ix}+\frac{1}{\epsilon+ix}\right] = \lim\limits_{\epsilon \to +0} \frac{1}{\pi}\frac{\epsilon}{\epsilon^2+x^2}  .
$$
Let call last function $\delta_\epsilon(x)$. You can easily show that $\int\delta_\epsilon(x) = 1\,$ $\forall \epsilon > 0$ and $\delta(x) \to 0$, $\epsilon \to 0$ $\forall |x| > 0$. From these two and $\delta_\epsilon(x) > 0$ it may be shown that
$$
\lim\limits_{\epsilon \to +0}\int\limits_{-\infty}^{\infty}\delta_\epsilon(x)f(x) = f(0).
$$
That is general $\delta$-function property. So we say that $\lim\limits_{\epsilon \to +0} \delta_\epsilon = \delta$, but we remember that such limit doesn't exist. Actually, we work with $\delta_\epsilon$ and then take limit $\epsilon \to 0$. 
Now we can study $f(x)\delta(x)$. Imagine you have some $\delta$-sequence, like one written here (you may find others here)
$$
\delta_\epsilon(x) = \frac{1}{\pi}\frac{\epsilon}{\epsilon^2+x^2}
$$
and you are interested in $\lim\limits_{\epsilon \to 0} f(x)\delta_\epsilon(x)$. You may use taylor series $f(x) = f(0) + o(x), \,x \to 0$ and $o(x)\delta_\epsilon(x) \to 0, \epsilon \to 0$ $\,\forall x$. I believe you can show it yourself using explicit expression for $\delta_\epsilon(x)$.
Mathematicians say that $\delta$ is a distribution It means it acts on function $\psi(x)$ and return you a number. For $\delta$ that number is $\psi(0)$. You write $\langle\delta(x)|\psi(x)\rangle = \psi(0)$.
If you interpret that action as a scalar product of functions (which is an integral) $\langle\psi(x) | \phi(x)\rangle = \int \psi^*(x)\phi(x) dx$ then it looks like a function $\delta(x)$. 
From that point of biew it is even easier to see that desired identity holds. $\langle f(x)\delta(x)|\psi(x)\rangle = \langle\delta(x)|f(x)\psi(x)\rangle = f(0)\psi(0) = \langle f(0)\delta(x)|\psi(x)\rangle$ (according to mathematicians it is not proof, it is definition).
P.S. I believe that common definition of coherent states fixes phase in different way ($\hbar = 1$)
$$ 
\langle r | \psi(r_i,p_i) \rangle = \left( \frac{ 2 \gamma}{\pi} \right)^{\frac{1}{4}} \exp \left[ -\gamma (r-r_i)^2 + i p_i(r-r_i) + \frac{i}{2}p_ir_i \right] .
$$
Then
$$
| \psi(r_i,p_i) \rangle = \exp\left[\frac{\gamma}{2}(r_i^2+p_i^2)\right] \sum\limits_{n=0}^{\infty}\sqrt{\frac{\gamma^n}{n!}}(r_i+ip_i)^n |n\rangle .
$$
P.S.S. @WetSavannaAnimalakaRodVance thank you for your comment. I know that $\theta \notin S$, but since I'm curious about value of $\theta(x)\delta(x)$ and $\mathrm{supp}\, \delta = {0}$ that's only discontinuity at $x = 0$ what I should be worried about. You can also apply following arguments to $\theta(x)\theta(1-|x|) = \mathrm{rect}(x-\frac{1}{2})-\mathrm{rect}(x+\frac{1}{2})$ and get the same result.
I've read https://math.stackexchange.com/q/1832691/10549 and liked the answer. I believe $x = 0$ would be a Lebesgue point of $\theta$ if you let $\theta(0) = \frac{1}{2}$ since 
 $$
   \lim\limits_{\varepsilon \to +0}\frac{1}{2\varepsilon} \int\limits_{-\varepsilon}^{\varepsilon} \theta(x) dx = \frac{1}{2}.
 $$
I will argue now that $\theta(x)\delta(x) = \frac{1}{2}\delta(x)$ in $S'$ with any sensible definition one can come up with. 


*

*Differentiation of distributions is well defined operation. Let me now imagine that it also obeys common rules like $(f^2)'=2ff'$, then $\theta\cdot\delta = \frac{1}{2}(\theta^2)'$ and I believe you will agree that $\theta^2 = \theta$ in $S'$. Therefore $\forall\, \varphi \in S$
$$
   \langle \theta\cdot\delta, \varphi\rangle = \frac{1}{2}\langle (\theta^2)', \varphi\rangle = -\frac{1}{2}\langle \theta^2, \varphi'\rangle = -\frac{1}{2}\int\limits_0^{\infty}\varphi'(x)dx = \frac{1}{2}\varphi(0).
 $$

*Another way to understand it is to approximate $\theta$ with continuous functions.
$$
   \theta(x) = \sum\limits_{m=0}^{\infty} \psi_m(x) = \frac{1}{2} + 2\sum\limits_{m=1}^{\infty}
   \frac{\sin{(2m-1)x}}{\pi(2m-1)}, \qquad
   x \in (-\pi, \pi).
 $$
And define
$$
   \langle \theta\cdot\delta, \varphi\rangle = \sum\limits_{m=0}^{\infty} \langle \delta, \psi_m\cdot\varphi\rangle = \varphi(0)\sum\limits_{m=0}^{\infty} \psi_m(0) = \frac{1}{2}\varphi(0).
 $$
Furthermore, there is theorem in analysis that says that if function $f \in L_1(-\pi,\pi)$ has $f'(x_0 \pm 0)$ then its Fourier series sum converges to $\frac{1}{2}(f(x_0+0)+f_0(x_0-0))$. 

