The expression [itex]\dfrac{\partial f(x)}{\partial g(y)}[/itex] is really just a short-hand, but there are a handful of rules about which manipulations "usually work" with the short-hand. It turns out that the convention you've named---that [itex]\dfrac{\partial f(x)}{\partial f(y)}[/itex] is [itex]1[/itex] if [itex]x=y[/itex] and [itex]0[/itex] if [itex]x\neq y[/itex]---gives us a slightly broader notion of "usually".
When you see the Dirac delta function in action, you ought to remind yourself:
"How will this look like when I integrate the expression?"
I haven't seen the result you post before, but do remember the two following results:
[tex]\int_{-\infty}^{\infty}f(x)\delta{(x-y)}dx=f(y)[/tex]
[tex]\int_{-\infty}^{\infty}f(y)\delta{(x-y)}dy=f(x)[/tex]
Most likely, your result follows from some clever manipulation of these two basic results.
Thanks for the replies.
Have found the answer in Parr and Yang's book on Density Functional Theory:
For a functional F=F[f] have
[tex]\delta F = \int \frac {\delta F} {\delta f(y)} \delta f(y) \,dy[/tex]
In a special case that F=F(f), i.e. F is just some function of f it is required that:
[tex]\frac {\delta F(f(x))} {\delta f(y)} = \frac {dF}{df} \delta(x-y) [/tex] in order to have:
[tex] \delta F = \int \frac {\delta F} {\delta f(y)} \delta f(y) \,dx = \frac {dF} {df} \delta f(x) [/tex]
So that taking F = f, get:
[tex] \frac {\delta f(x)} {\delta f(y)} = \delta (x-y) [/tex]