Let $f: \mathbb R^+ \rightarrow \mathbb R$ be a continuous and bounded function.
How can we show that $f_n(t) = f(0) 1_{t=0} + \sum_{k=1}^{n^2} f(\frac{k-1}{n}) 1_{\frac{k-1}{n} < t \le \frac{k}{n}}$ converges uniformly on all compacts of $\mathbb R^+$ to $f$ ?
When you restrict a continuous function to a compact set it improves its continuity, as it becomes uniformly continuous. For a compact set $K$, and $\varepsilon>0$ fix a $\delta>0$ such that $|f(x)-f(y)|\le \varepsilon$ for every $x,y$ such that $|x-y|\le \delta$. Now rewrite $f$ to compare it to $f_n$, to obtain \begin{align*} |f(t)-f_n(t)|&\le\left|f(t)1_{n<t\le\sup K}+\sum_{k=1}^{n^2} \left(f(t)-f(\frac{k-1}{n})\right)1_{\frac{k-1}{n}<t\le\frac{k}{n}}\right|\\ &\le |f(t)1_{n<t\le\sup K}|+ \sum_{k=1}^{n^2}\left|\left(f(t)-f(\frac{k-1}{n})\right)\right|1_{\frac{k-1}{n}<t\le\frac{k}{n}} \end{align*} and choose $n$ big enough to allow $f_n$ to 'cover' $[0,\sup K]$ and so that its steps are smaller than $\delta$. Let me know if you need more details. (Also can you extend the result to continuous functions that decay at infinity?)