Substituting x=y=1 yields f(−2f(1))=−1.
Substituting x=n and y=1 yields f(−f(n)−f(1))=−n.
Substituting x=−f(n)−f(1) and y=−2f(1) then yields
f(−f(−f(n)−f(1))−f(−2f(1)))=1−(−f(n)−f(1))−(−2f(1))
in which the left hand side expands as f(−(−n)−(−1))=f(n+1) and the right hand as 1+f(n)+f(1)+2f(1)=f(n)+3f(1)+1.
Writing c=3f(1)+1, we then get f(n+1)=f(n)+c.
Applying induction in both directions, we see that f(n+k)=f(n)+ck for all k∈Z.
Substituting n=0 then yields f(k)=f(0)+ck for all k∈Z, so f is a linear function.
Now let a,b∈Z be such that f(x)=ax+b for all x∈Z. Then the left hand side of the functional equation evaluates as
f(−f(x)−f(y))=a(−ax−b−ay−b)+b=−a2x−a2y−2ab+b.
For all x and y this must be equal to 1−x−y. Therefore the coefficient for x on both sides must be equal (for fixed y both sides must give the same function in x), so −a2=−1, and therefore a=1 or a=−1.
If a=−1, substituting x=y=0 yields 2b+b=1, which contradicts b being an integer.
If a=1, substituting x=y=0 yields −2b+b=1, so b=−1.
Indeed, if a=1 and b=−1, then the left hand side also expands to 1−x−y.
Therefore the only solution to the functional equation is the function f(x)=x−1.
f(x)=x−1