Let us define two sets:
$A= \{ U(f,P)$ where P is any partition of $[a,b] \}$,
$B= \{ L(f,P)$ where P is any partition of $[a,b] \}$,
where $U$ are upper sums and $L$ are lower sums. If we take some partition $P$ of a segment $[a,b]$ we get some upper and lower sums.
Set $A$ contains all possible upper sums for every partition $P$ (every partition generates one number to be upper sum).
Set $B$ contains all possible lower sums for every partition $P$ (every partition generates one number to be lower sum).
Now we define two numbers (which I will denote little differently from you so that it can be more clear):
$I_{*} = \inf(A)$,
$I^{*} = \sup(B)$.
Remark. We presuppose existence of $\inf(A)$ and $\sup(B)$ (if they do not exist then function is not R- integrabile).
Number $I_{*}$ is lowest of all possible upper sums, more precisely it is infimum of A.
Number $I^{*}$ is greatest of all possible lower sums, more precisely it is supremum of B.
Now we can define when function is R-integrabile (if lowest upper sum and greatest lower sum coincide). Function $f$ is Riemann integrable if $I_{*}=I^{*}$ and integral is equal to $I_{*}$ or $I^{*}$.
Let us take example of $f(x) = x$ on segment $[0,10]$, ie. $\int_{0}^{10}f(x)dx$. It will not suffice to take any partition $P$ of segment $[0,10]$ and then calculate upper and lower sum. We need to take all partitions of segment $[0,10]$ and then get upper and lower sum for all possible partitions. Then construct sets as previously explained and then find lowest possible upper sum and greatest lower sum (more precisely $\inf(A)$ and $\sup(B)$).
You can see not only rigorously (which I will not show here) but graphically that upper sum gets lower and lower sum gets bigger as equidistant partitions become shorter and shorter. So you can simply presuppose some equidistant partition of length $\Delta x$ and then calculate upper or lower sum and after that take limit as $\Delta x$ goes to zero. In that way you will get $\int_{0}^{10}f(x)dx=50$.
Feel free to ask follow up questions.
Edit: (To big to be a comment).
@Rob It is not nessecary that there even exists partition that gives $U(f)$ and $L(f)$. If you have function simple as $f(x) =x$ it will not exist, because for every partition upper and lower sums (they are geometrically rectangles) are at least slightly bigger or smaller. However, what you are intreseted in are limits of these upper and lower sums, and they can exist even if there is no particular partition which realizes these limits of lower and upper sums.
Think of this analogy: take an example of set $S= \{ \dfrac{1}{n} : n \in \mathbb{N}\}$. Infimum $\inf(S) = 0$ although there is not any $n$ for which $\dfrac{1}{n}$ is zero. In the same way, although there is no partition which gives you $U(f)$ and $L(f)$ still they are infimum and supremum of associated sets.
Intuitively your observation is correct, and that is why its sometimes said that when doing integration you divide your segment into infinite little pieces and then sum area of infinitely thin rectangles.
Best Answer
I don't see what I consider the salient points in the other answers, so here we go.
What I always called the convenient criterion for integrability in my teaching is this: $f$ is integrable on $[a,b]$ if and only if for every $\epsilon>0$, there is a partition $P$ with $U(f,P)-L(f,P)<\epsilon$.
Create a partition as follows. I will suppose $a<x_0<b$. You can take care of the other cases. If $k=0$, the function is the zero function and there's nothing to do (I hope).
Given $\epsilon>0$, let $P$ be the partition $t_0=a$, $t_1=x_0-\delta$, $t_2=x_0+\delta$, $t_3=b$. We choose $\delta>0$ small enough so that $t_0<t_1<t_2<t_3$ and then small enough so that $2|k|\delta<\epsilon$. If $k>0$, we have $U(f,P) = 2k\delta$ and $L(f,P)=0$. If $k<0$, we have $U(f,P) = 0$ and $L(f,P) = 2k\delta$. In either event, we have $U(f,P)-L(f,P)<\epsilon$. [You should draw pictures to see what's going on here. I'm leaving it to you to write out explicitly the formulas for $U(f,P)$ and $L(f,P)$.]
Combining 1 and 2, we have shown $f$ is integrable on $[a,b]$. A very important point is that we do not always need to use a partition into subintervals of equal length.