distribution associated with a discontinuous function 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.
 A: It is important to use the fact that $f$ has left and right limits at integer points. Otherwise $f$ need not be locally integrable and $T_f$ is not a well defined distribution. The fact that these limits exist implies that it is bounded in $(n,n+1)$ and hence it is locally integrable. Any locally integrable function defines a distribution. In 2) there is no guarantee that $f'$ is even locally integrable so $T_f'$ cannot be written in terms of $f'$ without extra assumptions.  
A: 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.
