Let the given assertion be $P(m,n)$
$$P(0,n) \implies f(f(n))=n+f(0)$$
So, let's assume $f(a)=f(b)$
$$f(a)=f(b)\implies f(f(a))=f(f(b)) \Leftrightarrow a+f(0)=b+f(0) \Leftrightarrow a=b$$
That means that $f$ is injective (one-to-one), so $f(a)=f(b)\Leftrightarrow a=b$
Now,
$$P(0,0)\implies f(f(0))=f(0) \Leftrightarrow f(0)=0$$
So, (by $P(0,n)$)
$$f(f(n))=n$$
Now,
$$P(m,f(n))\implies f(m+n)=f(m)+f(n)$$
This is a well-known functional equation called the Cauchy functional equation.
One way of dealing with it:
$$\underbrace{f(n)+f(n)+\dots+f(n)}_\text{$k$ times}=f(\underbrace{n+n+\dots+n}_\text{k times})$$
$$\Leftrightarrow kf(n)=f(kn)$$
and putting $n=1$ we get $f(k)=kf(1)$ for all $k \geq 1$
Another way of dealing with it:
Let the conclusion above be $H(m,n)$
$$H(1,1)\implies f(2)=2f(1)$$
$$H(2,1)\implies f(3)=f(2)+f(1)=2f(1)+f(1)=3f(1)$$
$$H(3,1)\implies f(4)=f(3)+f(1)=3f(1)+f(1)=4f(1)$$
and so on, by simple induction, we can say that
$f(x)=xf(1)$ for all $x \geq 1$ and $f(0)=0$
So, for both ways, we need to extend it over the negative integers, by proving that $f$ is odd.
Well,
$$H(m,-m) \implies f(m)+f(-m)=0 \Leftrightarrow f(-m)=-f(m)$$
Or (another way)
$$P(-f(n),n)\implies f(-f(n))+n=0 \Leftrightarrow f(-f(n))=-n$$
$$P(0,-f(n)) \implies f(f(-f(n)))=-f(n) \Leftrightarrow f(-n)=-f(n)$$
So, $f$ is odd, meaning that $f(x)=xf(1)$ applies for all integers $x$
Let $f(1)=c$ giving $f(x)=cx$, substituting in the original equation, we get
$$cm+{c^2}n=cm+n$$
$$\Leftrightarrow c^2=1 \implies c=\pm 1$$
So,
$$f(x)= \pm x$$