I don't quite understand the following functional derivative computation when I read a variational inference literature, can someone explain? $$L[q] = E_{q(Y)}[f(Y)]$$ $$\frac{\delta L[q]}{\delta q} = f(Y)$$ Here, $q(Y)$ is a probability density function. The original deduction is here, the relevant steps are equation (14) (17) (under assumption (11)).
I don't know why $q \rightarrow 0 \Rightarrow \int f(Y)q(Y)dY \rightarrow f(Y)$, it seems $q$ acts as a Dirac delta function in the limit case. Am I right? If so, how to argue? Any insights are welcome.