We have, as you write correctly,
$$ \def\p#1#2#3{\frac{\partial^{#3} #2}{\partial #1^{#3}}}\p x{}{} f(r) = f'(r)\p x r{} $$
Taking another derivative, we have, using the product rule first
$$ \p x{}2 f(r) = \p x{}{}\left(f'(r) \p xr{}\right)
= \p x{}{} f'(r) \p xr{} + f'(r) \p xr2$$
Using the chain rule in the first term as for the first derivative, gives
$$ \p x{}2 f(r) = f''(r) \left(\p xr{}\right)^2 + f'(r)\p xr2 $$
Now,
$$ \p xr{} = \frac xr, \quad \p xr2 = \frac{r - \frac{x^2}r}{r^2} = \frac{r^2 - x^2}{r^3}$$
Hence
$$ \p x{}2 f(r) = f''(r) \frac{x^2}{r^2} + f'(r) \frac{r^2 - x^2}{r^3} $$
Due to symmetry, the $y$- and $z$-derivatives are analogous.