A proof involving derivatives of Dirac delta functions Let us define
$$\tag{1}
    Q=i\nabla_\mathbf{k}\delta(\mathbf{k-k'})\left[\rho_{nm}(\mathbf{k'})-\rho_{nm}(\mathbf{k})\right],
$$
$\delta(\mathbf{k})$ is a Dirac delta, and $\rho_{nm}(\mathbf{k})$ is a continuous smooth function. I wish to show that
$$\tag{2}
Q =i\delta(\mathbf{k-k'})\nabla_\mathbf{k}\rho_{nm}(\mathbf{k}).
$$
My strategy relies on the idea that
$$\tag{3}
Q=\nabla_\mathbf{k}\int d\mathbf{k}\,Q.
$$
I asked a question related to this notion yesterday.
Proceeding under the assumption that Eq. (3) is true, let us integrate and differentiate $Q$ with respect to $\mathbf{k},$
$$
    Q = \nabla_\mathbf{k}\int d\mathbf{k} \,Q \nonumber \\
      = \nabla_\mathbf{k}\int d\mathbf{k} \left(i\nabla_\mathbf{k}\delta(\mathbf{k-k'})\rho_{nm}(\mathbf{k'})-i\nabla_\mathbf{k}\delta(\mathbf{k-k'})\rho_{nm}(\mathbf{k}) \right), \nonumber \\
      = i\rho_{nm}(\mathbf{k'})\nabla_\mathbf{k}\int d\mathbf{k}\,\nabla_\mathbf{k}\delta(\mathbf{k'-k})
     -i\nabla_\mathbf{k}\int d\mathbf{k}\,\nabla_\mathbf{k}\delta(\mathbf{k-k'})\rho_{nm}(\mathbf{k}).
\tag{4}
$$
The first term vanishes, since the derivative of a delta function is odd. To evaluate the second term, we use the identity
$$\tag{5}
    \int\frac{d}{dx}\delta(x-x')f(x)dx=-\int\delta(x-x')\frac{d}{dx}f(x)dx,
$$
to obtain
$$\tag{6}
    Q = i\nabla_\mathbf{k}\int d\mathbf{k}\,\delta(\mathbf{k-k'})\nabla_\mathbf{k}\rho_{nm}(\mathbf{k}).
$$
Comparison with the first line of Eq. (4) yields
$$\tag{7}
    Q = i\delta(\mathbf{k-k'})\nabla_\mathbf{k}\rho_{nm}(\mathbf{k}).
$$
What if we had chosen to integrate and differentiate $Q$ with respect to $\mathbf{k'}$ instead? We will need the identities
$$\tag{8}
    \frac{d}{dx}\delta(x-x')=-\frac{d}{dx'}\delta(x-x'), \qquad \delta(x-x')=\delta(x'-x).
$$
Applying Eq. (8) to Eq. (1),
$$\tag{9}
    Q = i\nabla_\mathbf{k}\delta(\mathbf{k-k'})\rho_{nm}(\mathbf{k'})-i\nabla_\mathbf{k}\delta(\mathbf{k-k'})\rho_{nm}(\mathbf{k}) \\
       = -i\nabla_\mathbf{k'}\delta(\mathbf{k-k'})\rho_{nm}(\mathbf{k'})-i\nabla_\mathbf{k}\delta(\mathbf{k-k'})\rho_{nm}(\mathbf{k}) \\
        = -i\nabla_\mathbf{k'}\delta(\mathbf{k'-k})\rho_{nm}(\mathbf{k'})-i\nabla_\mathbf{k}\delta(\mathbf{k-k'})\rho_{nm}(\mathbf{k}).
$$
Integrating and differentiating $Q$ with respect to $\mathbf{k'}$ this time,
$$
    Q = \nabla_\mathbf{k'}\int d\mathbf{k'} Q \nonumber \\
     = \nabla_\mathbf{k'}\int d\mathbf{k'} \left(-i\nabla_\mathbf{k'}\delta(\mathbf{k'-k})\rho_{nm}(\mathbf{k'})-i\nabla_\mathbf{k}\delta(\mathbf{k-k'})\rho_{nm}(\mathbf{k}) \right) \nonumber \\
     = \nabla_\mathbf{k'}\int d\mathbf{k'} i\delta(\mathbf{k'-k})\nabla_\mathbf{k'}\rho_{nm}(\mathbf{k'}) -i\rho_{nm}(\mathbf{k})\nabla_\mathbf{k}\nabla_\mathbf{k'}\int d\mathbf{k'}\delta(\mathbf{k-k'}),
\tag{10}
$$
where to obtain the first term in the last line we have used Eq. (5), and where the second term in vanishes because the integral just gives $1.$ Equating the integrands of the first and last lines of Eq. (10), we obtain
$$\tag{11}
    Q=i\delta(\mathbf{k-k'})\nabla_\mathbf{k'}\rho_{nm}(\mathbf{k'}),
$$
which, if $\mathbf{k}=\mathbf{k'},$ agrees with the desired result. That is, if $\mathbf{k}=\mathbf{k'},$ Eqs. (2), (7), and (11) unambiguously give
$$\tag{12}
    Q=i\nabla_\mathbf{k}\rho_{nm}(\mathbf{k}).
$$
However, if $\mathbf{k}=\mathbf{k'},$ then Eq. (1) gives $0$ immediately...
Even if my proof is flawed, I believe the result Eq. (2) is correct. Can anyone comment on the use of Eq. (3), or provide a simple alternative proof?
 A: To do rigorous computations with the derivative of the Dirac delta we have to multiply by $C^1$ test functions $\varphi(k,k')$ and integrate. Even better, we can choose $\varphi$ to be smooth and compactly supported. Let $ρ := \rho_{nm}∈ C^1$. Then by definition of $\nabla\delta_0$, $\langle \nabla\delta_0,\varphi\rangle = -\langle \delta_0,\nabla\varphi\rangle$, therefore
$$
\begin{align*}
\langle Q,\varphi\rangle &= i\, \langle \nabla\delta_0(k-k'),(\rho(k)-\rho(k'))\,\varphi\rangle
\\
&= -i\, \langle \delta_0(k-k'),\nabla_k\!\left((\rho(k)-\rho(k'))\,\varphi\right)\rangle
\\
&= -i\, \langle \delta_0(k-k'),\nabla \rho(k)\,\varphi + (\rho(k)-\rho(k'))\,\nabla_k\varphi\rangle
\\
&=  \langle -i\,\delta_0(k-k')\nabla \rho(k),\,\varphi\rangle
\end{align*}
$$
where I used the chain rule and the fact that $(\rho(k)-\rho(k'))\,\nabla_k\varphi(k,k')$ is $0$ when $k=k'$ since $\rho$ is continuous in $0$ and $\nabla_k\varphi$ is continuous. Therefore
$$
i\, \nabla\delta_0(k-k')\,(\rho(k)-\rho(k')) = -i\,\delta_0(k-k')\nabla \rho(k)
$$
in the sense of distributions.
