Let $f\colon\mathbb{R}\to\mathbb{R}$ be such that, for every $n\in\mathbb{Z}$, $f$ is differentiable on $\left(n,n+1\right)$ and $n$ is a discontinuity of first kind of $f$. We define $$T_f(\phi)=\int_{\mathbb{R}}f(x)\phi(x)dx,\quad\text{where }\phi\text{ is a test function}.$$ I understand that, when $f$ is continuously differentiable, $T_f$ is well defined and the derivative of $T_f$ is just $T_{f'}$. However, these two do not seem clear in this case.
My attempt: Since $n$ and $n+1$ are discontinuities of first kind of $f$, we can define a new function, say $g_{n}$ such that $g_{n}$ is continuous on $[n,n+1]$ and equal to $f$ a.e. Thus $f$ is (Lebesgue) integrable on $[n,n+1]$. We then conclude that $f$ is locally integrable on $\mathbb{R}$ and therefore $T_{f}$ is well defined.
My question: 1) Is the above reasoning (to show that $T_f$ is well defined) correct? And:
2) What would the derivative of $T_f$ look like in this case? I think it is not $T_{f'}$ as $f'$ is not defined at $n$.
Any help/hint is highly appreciated.
If $f$ is absolutely continuous on each segment $[n, n + 1]$ when defined to take the values $f(n + 0)$ and $f((n + 1) - 0)$ at the endpoints, integration by parts shows that the distributional derivative is $$f'(x) + \sum_n (f(n + 0) - f(n - 0)) \delta(x - n),$$ where $f'(x)$ is the ordinary derivative. If the conditions for integration by parts do not hold, the distributional derivative may not be representable in this form. Also, if the test functions do not have finite support, it is necessary to add a condition on how fast $f$ can grow.