Prove that $\{f_n\} _{n=1}^{\infty}$ uniformly converges to $ f(x)=\int_{0}^{1}g(x,t)\mathrm{dt}$ Let $g:(0,\infty)\times [0,1]\to {\mathbb{R}}$ be continuous with respect to each variable separately  and  $$f_n=\frac{1}{n}\sum_{i=1}^{n}g\left(x,\frac{i}{n}\right)$$
How can show that $\{f_n\} _{n=1}^{\infty}$ uniformly converges to $\displaystyle f(x)=\int_{0}^{1}g(x,t)\mathrm {dt}$  on  $[m,M]$, each subset of $(0,\infty)$.

I will show you an example that $f$ is not continuous on $[0, 1]$. It is easy to adapter it to $(0,\infty)$. In particular, your statement is not valid in general.
For $x > 0$ let $g(x, \cdot)$ be the hat function with support on $[0, 1/x]$ and maximum value $x$. Further let $g(0, \cdot) = 0$. Then, $g$ is separately continuous and $f$ is discontinuous at $x=0$.
Notice: the statement is valid, if you add an equicontinuity type condition.
