Solution by EmptySet.
Either
f(x)=0
or
f(x)=x
for all x.
If
f(0)=0,
then from
P(0,f(0)z−f(0)),
we get
f(z)=f(0)
for all z. But the only constant that solves the equation is zero, a contradiction. So
f(0)=0.
Suppose
f(u)=u
for some u=0. Then pick v such that
uv=f(u)2+v⋅f(u).
Then P(u,v) gives
u⋅f(u)=0,
and thus
f(u)=0.
It follows from
P(u,uz)
that
f(z)=0
for all z.