none of which produce the desired output of \delta^2g(\delta x, \delta y) + \delta^3\partial_xg(\delta x, \delta y). The last(4th) attempt seems to be the closest, but the output is a two element list, with each element having a correct and incorrect term.
Unless I missed something there should be d^2 next to the first term, or?
Here is what you can do:
fun /. f -> Function[{x, y}, d^2 g[ d x, d y]]
or, less verbose
fun /. f -> ( d^2 g[ d #, d #2]& )
Why did your examples fail?
Nothing prevents D[f[x,y],x] from evaluation so it evaluates to Derivative[1, 0][f][x, y].
This is why your first example fails, it does not much it.
The second example does not work because you are replacing f, which is an operator with a product of \[Delta]^2 g where g was supposed to be an operator but how could MMA know it.
Same story with the third example, additionaly, if you have a list of list of replacements you will get a list. You should provide a flat list of rules to get one result only.
If you would’ve applied a flat list in the forth example, you’d get a correct result. But writing rules for each derivative is not something one would like to do. My solution avoids that because if you replace f in Derivative[...][f] with a function, Derivative will take care about applying the chain rule.
Why doesn’t the expansion derivative get evaluated? E.g. why is the output \partial_y^2(f_0 + \delta^2f_2+\delta^4f_4) instead of \partial_y^2f_0 + \delta^2\partial_y^2f_2 + \delta^4\partial_y^2f_4?
Subscript may format like Derivative. But it is an “inert” wrapper basically, conveying no mathematical content. How that plays out might be seen from looking at FullForm.