Let $f$ be an infinitely differentiable real-valued function defined on the real numbers. If
$$
f\left(\frac{1}{n}\right)=\frac{n^{2}}{n^{2}+1}, \quad n=1,2,3, \ldots
$$
compute the values of the derivatives $f^{(k)}(0), k=1,2,3, \ldots$.

Let's think step by step and output the final answer within \boxed{}.
user