The definite integral of a function $f(x)$ from $a$ to $b$ as the limit of a sum is: $$\int_a^bf(x)dx=\lim_{h\rightarrow 0}h(f(a)+f(a+h)+.. ..+f(a+(n-2)h)+f(a+(n-1)h))$$ where $h=\frac{b-a}{n}$. So, replacing $h$ with $\frac{b-a}{n}$ gives:
$$\lim_{n\rightarrow \infty}(b-a)\frac{f(a)+f\left(a+\frac{b-a}{n}\right)+.. ..+f\left(a+(n-2)\frac{b-a}{n}\right)+f\left(a+(n-1)\frac{b-a}{n}\right)}{n}$$
This seems to be of the form $\frac{\infty}{\infty}$ because the numerator is an infinite sum and the denominator also tends to infinity, so I think L'Hospital's rule can be applied. So, applying L'Hospital's rule gives: $$\int_a^bf(x)dx=\lim_{n\rightarrow \infty}\frac{(b-a)^2}{n^2}\left(-f'\left(a+\frac{b-a}{n}\right)-2f'\left(a+2\frac{(b-a)}{n}\right)-3f'\left(a+3\frac{(b-a)}{n}\right)-.....+3f'\left(a+(n-3)\frac{(b-a)}{n}\right)+2f'\left(a+(n-2)\frac{(b-a)}{n}\right)+f'\left(a+(n-1)\frac{(b-a)}{n}\right)\right)$$ Replacing $\frac{(b-a)}{n}$ with $h$ gives: $$\int_a^bf(x)dx=\lim_{h\rightarrow 0}h^2(-f'(a+h)-2f'(a+2h)-3f'(a+3h)-.....+3f'(a+(n-3)h)+2f'(a+(n-2)h)+f'(a+(n-1)h))$$ Replacing $f'(x)$ with $f(x)$ and hence $f(x)$ with $\int f(x)dx$ gives: $$\int_a^b\left(\int f(x)dx\right)dx=\lim_{h\rightarrow 0}h^2(-f(a+h)-2f(a+2h)-3f(a+3h)-.....+3f(a+(n-3)h)+2f(a+(n-2)h)+f(a+(n-1)h))$$ Does the above series make any sense to you? I'm asking this because the starting terms of the series are negative and the first term is multiplied by 1, the second term by 2, the third term by 3, etc,i.e the multipliers are increasing by 1, but the last terms of the series are positive and the multipliers are decreasing by 1 instead as we move forward in the series. Is it something like some transition from negative terms to positive terms takes place in the middle or something? Or Is applying L'Hospital's rule not allowed in this case?
Some points. First, the numerator being an infinite sum, in the sense that the number of terms in the sum becomes unbounded, does not imply that the sum itself is infinite. That's precisely what the study of convergence of series is all about.
Moreover, L'Hôpital is used for calculating 'continuous' limits, not limits of sequences. This is not to say you can't use it to calculate things like
$$\lim_{n\to\infty}n\sin\left(\frac1n\right)=\lim_{n\to\infty}\frac{\sin\left(\frac1n\right)}{\frac1n},$$
by recognizing that as $\lim_{x\to0}\frac{\sin(x)}x$. But that's because a continuous a limit is stronger than the discrete one, in the sense that if $\lim_{x\to0}f(x)$ exists and equals $L$, then $\lim_{n\to\infty}f(a_n)=L$ for any sequence $a_n\to 0$. You can check this directly from the definition of these limits.