Understanding of the definition of improper integrals The question is motivated from the following exercise:

Prove that
  $$
\lim_{m\to \infty}\sum_{n=1}^{\infty}\frac{m}{m^2+n^2}=\int_{0}^\infty\frac{1}{1+x^2}
$$


Rewriting the series on left hand side, we have
$$
\sum_{n=1}^\infty\frac{m}{m^2+n^2}=\sum_{n=1}^{\infty}\frac{1}{1+(n/m)^2}\frac{1}{m}
$$
If we view this as a "Riemann sum" of the right hand side, then we are done. The problem is that the Riemann sum is not defined for the improper integrals. 
Here is my question:

Can an improper integral defined by the limit of a Riemann sum?

 A: This is just the definition of improper Riemann integration:
$$\int_{0}^\infty \frac{1}{1+x^2}\ dx:=\lim_{a \to \infty}\int_{0}^a \frac{1}{1+x^2}\ dx$$
then deform the right-side definite integral to the limit of Riemann sum and you will find the answer.
More specifically, let $f(\cdot)$ defined on $(0,\infty)$ can be integrated in the sense of improper Riemann integration, then
$$\int_0^\infty f(x)\ dx=\lim_{N \to \infty}\int_0^N f(x)\ dx=\lim_{n,N\to \infty}\sum_{t=1}^{Nn}{1 \over n}f\bigg({t \over n}\bigg)$$
where the last term can be evaluated by $\lim_{n \to \infty}\sum_{t=1}^{\infty}{1 \over n}f\bigg({t \over n}\bigg)$ from the following simple argument:
Let $a:=\lim_{n,N\to \infty}\sum_{t=1}^{Nn}{1 \over n}f\bigg({t \over n}\bigg), b:=\lim_{n \to \infty}\sum_{t=1}^{\infty}{1 \over n}f\bigg({t \over n}\bigg)$, then
\begin{equation*}
\begin{split}
|a-b| &\leq \bigg|a-\sum_{t=1}^{Nn}{1 \over n}f\bigg({t \over n}\bigg)\bigg|+\bigg|\sum_{t=1}^{Nn}{1 \over n}f\bigg({t \over n}\bigg)-b\bigg|
\end{split}
\end{equation*}
by which $|a-b|$ can be as small as we want whence $a=b$.
