I'll first give some context for the problem I'm having, but the essence of it seems to be related to only what is in the title.
I've been working with the Wetterich equation for the Functional Renormalization Group. In this technique, we often need to compute functional derivatives of the effective action. Often the calculations get simpler when working with momentum space. However, I have been struggling with how to actually take the derivatives in momentum space.
Pick, for example, the effective action given by $$\Gamma_k[\varphi] = \int - \frac{1}{2} \varphi \partial^2 \varphi + \frac{m_k^2}{2} \varphi^2 + \frac{\lambda_k}{4!} \varphi^4 \textrm{d}^4 x.$$
In position space, the second functional derivative would read $$\frac{\delta^2 \Gamma_k}{\delta \varphi(x) \delta \varphi(y)} = - \partial^2 \delta^{(4)}(x-y) + m_k^2 \delta^{(4)}(x-y) + \frac{\lambda_k}{2}\varphi^2(x) \delta^{(4)}(x-y),$$ but since it is weird to write $- \partial^2$, we'll often just implicitly take this expression to momentum space and write $$\frac{\delta^2 \Gamma_k}{\delta \varphi \delta \varphi} = q^2 + m_k^2 + \frac{\lambda_k}{2}\varphi^2, \tag{1}$$ where the deltas are omitted since they were only an identity on "functional matrix space" and $q$ stands for momentum.
Eq. (1) can be found, for example, on R. Percacci's An Introduction to Covariant Quantum Gravity and Asymptotic Safety as a special case of Eq. (6.26). More specifically, Percacci writes
$$\Gamma_k(\varphi) = \int \textrm{d}^4x \left[\frac{1}{2} (\partial_\mu\varphi)^2 + V_k(\varphi^2)\right] \tag{6.24}$$
and
In momentum space [...] the inverse propagator is $$\frac{\delta^2 \Gamma_k}{\delta \varphi \delta \varphi} = q^2 + 2 V_k' + 4 \varphi^2 V_k'', \tag{6.26}$$ where a prime denotes the derivative with respect to $\varphi^2$.
Notice Eq. (1) is just Percacci's Eq. (6.26) for the potential $V_k(\phi^2) = \frac{m_k^2}{2} \varphi^2 + \frac{\lambda_k}{4!} \varphi^4$.
Let us now attempt to obtain the same conclusion by rewriting the effective action on momentum space from the very start. Denoting the Fourier transform by $$\tilde{\varphi}(p) = \int \varphi(x) e^{- i x \cdot p} \textrm{d}^4 x$$ so that the inverse reads $$\varphi(x) = \frac{1}{(2\pi)^4} \int \tilde{\varphi}(p) e^{+ i x \cdot p} \textrm{d}^4 p.$$ We get, for the first term, $$ \begin{align} \int - \frac{1}{2} \varphi \partial^2 \varphi \textrm{d}^4 x &= \frac{1}{(2\pi)^8}\int - \frac{1}{2} \tilde{\varphi}(p)\tilde{\varphi}(q) e^{i x \cdot p}\partial^2 e^{i x \cdot q} \textrm{d}^4 x \ \textrm{d}^4 p \ \textrm{d}^4 q, \\ &= \frac{1}{(2\pi)^8} \int \frac{1}{2} q^2 \tilde{\varphi}(p)\tilde{\varphi}(q) e^{i x \cdot (p + q)} \textrm{d}^4 x \ \textrm{d}^4 p \ \textrm{d}^4 q, \\ &= \frac{1}{(2\pi)^4} \int \frac{1}{2} q^2 \tilde{\varphi}(p)\tilde{\varphi}(q) \delta^{(4)}(p + q) \textrm{d}^4 p \ \textrm{d}^4 q, \\ &= \frac{1}{(2\pi)^4} \int \frac{1}{2} q^2 \tilde{\varphi}(p)\tilde{\varphi}(-p) \textrm{d}^4 p. \end{align} $$
Proceeding similarly with the other terms, we get to $$\Gamma_k[\varphi] = \frac{1}{(2\pi)^4} \int \frac{1}{2} \big[p^2 + m_k^2 \big] \ \tilde{\varphi}(p)\tilde{\varphi}(-p) \textrm{d}^4 p + \frac{\lambda_k}{4! (2\pi)^{12}} \int \tilde{\varphi}(p)\tilde{\varphi}(q)\tilde{\varphi}(r)\tilde{\varphi}(-p-q-r) \textrm{d}^4 p \ \textrm{d}^4 q \ \textrm{d}^4 r.$$
Hence, it seems that the functional derivative is $$\frac{\delta^2 \Gamma_k}{\delta \varphi(p) \delta \varphi(q)} = \frac{1}{(2\pi)^4} p^2 \delta^{(4)}(p+q) + \frac{1}{(2\pi)^4} m_k^2 \delta^{(4)}(p+q) + \frac{\lambda_k}{2 (2\pi)^{12}} \int \tilde{\varphi}(r)\tilde{\varphi}(-p-q-r) \textrm{d}^4 r. \tag{2}$$
I can't understand how Eqs. (1) and (2) can coexist. They appear to give vastly different expressions for the same thing, especially due to the integral. The factors of $(2\pi)^4$ everywhere seem to be wrong, but I can't figure out why. In short, what is the correct manner of taking the functional derivative on momentum space and why do Eqs. (1) and (2) (seem to) disagree? References and further comments are welcome, but not necessary for the answer to be accepted.
Edit: I removed the mention of taking $\tilde{\varphi}(p) = \tilde{\varphi}_0$, as I recalled this is incorrect. We in fact take $\varphi(x) = \varphi_0$, in position space. Nevertheless, the main points of the question remain.