Understanding a difference between a functional derivative and discrete case I can take the following functional derivative
$$ C(p)=\frac{\delta}{\delta \phi(p')} \frac{\delta}{\delta \phi(-p')} \int_{-\infty}^{\infty} dp \phi(p)\phi(-p) = 2\delta(0). $$
where I am left with an extra delta function (on top of the one that killed the integral) because I took two functional derivatives. If I discretize the momentum I would expect this to be equivalent to:
$$ D(p_j)=\frac{\partial}{\partial \phi(p_j)} \frac{\partial}{\partial \phi(-p_j)} \sum_{i} \phi(p_i)\phi(-p_i) = 2. $$
As noted by loewe, the units do not match in the above. The only scale available to fix this is the momentum integration interval, let's call it $P$. If instead we take $\int \textrm{d}p \to P \sum_p$, $\frac{\delta}{\delta  \phi(p)} \to P^{-1} \frac{\partial}{\partial  \phi_p}$ and $\delta(0) \to P^{-1}$ the units stay the same under discretization. However, it is not completely clear why these replacements are entirely appropriate.
Moreover this doesn't really solve my confusion that in one case we seem to have
$$ \int dp C(p) f(p) = 2f(0)$$
which only depends on the value of $f$ at $p=0$ while in the other we have
$$ \sum_{p_j} D(p_j) f(p_j) = 2 \sum_{p_j} f(p_j)$$
which depends on the value of $f$ at all momenta.
How do I resolve this? What am I misunderstanding?
 A: The units of the functional derivative are
\begin{equation}
\left[ \frac{\delta}{\delta  \phi(p)} \right] = \frac{[\textrm{Length}]}{[\phi]}
\end{equation}
since the delta function $\delta(p)$ has units of $[\textrm{Length}]$. In contrast, the units of the regular derivative are
\begin{equation}
\left[ \frac{\partial}{\partial  \phi_p} \right] = \frac{1}{[\phi]}
\end{equation}
Hence, your two expressions do not even have the same units. With $\int \textrm{d}p \to L^{-1} \sum_p$, $\frac{\delta}{\delta  \phi(p)} \to L \frac{\partial}{\partial  \phi_p}$ and $\delta(0) \to L$, the discretization works out perfectly.
Edit to answer comment: $L$ is the size of the system and thus serves as infrared cutoff for all momenta, hence the smallest unit of momentum is $\Delta p = L^{-1}$. This explains the (standard) replacement $\int \textrm{d}p \to \Delta p \sum_p = L^{-1} \sum_p$. To see why the replacement for the delta function is natural, note that it has the property that its integral over all $p$ is 1 but it vanishes for any $p$ further from $p=0$ than $\Delta p$. Hence, we can think of it as a box function of width $\Delta p = L^{-1}$ and height $\Delta p^{-1} = L$. This explains $\delta(0) \to L$. This also fixes the prefactor of the discretized version of the functional derivative if we require that $\frac{\delta \phi(p)}{\delta  \phi(p')} = \delta(p-p')$.
A: You second equation with the "2" on the RHS is wrong. It should be $2N$ where $N$ is the number of possible "$i$"s. In the continuum limit this is infinite, just as is the $\delta(0)$.
