Notations and Definitions Let $(X, \mu)$ be a measure space. Let $f\colon X \rightarrow [0, \infty]$ be a measurable function on $X$. We define a function $F_f\colon [0, \infty) \rightarrow [0, \infty]$ by
$F_f(t) = \mu(\{x \in X; f(x) > t\})$
We use the definitions of this question.
Lemma 1 Let $(X, \mu)$ be a measure space. Let $f\colon X \rightarrow [0, \infty]$ be a measurable function on $X$. Suppose $f$ is integrable on $X$. Then $F_f(t) < \infty$ for every $t > 0$.
Proof: Let $X_t = \{x \in X; f(x) > t\}$.
Then
$t\mu(X_t) \le \int_{X_t} f \, d\mu \le \int_X f \, d\mu < \infty$.
Since $t > 0$, $F_f(t) = \mu(X_t) < \infty$.
QED
Lemma 2 Let $[a, b]$ be a finite interval of the real line. Let $f\colon [a, b] \rightarrow (-\infty, \infty)$ be a monotone function on $[a, b]$. Then $f$ is Riemann integrable.
Proof: Without loss of generality, we can assume that $f$ is non-decreasing. Let $P\colon a = t_0 < t_1 <\cdots < t_{k-1} < t_k = b$ be a partition of $[a, b]$.
Then
$s_P = \sum_{i= 1}^k f(t_{i-1}) (t_i - t_{i-1})$.
$S_P = \sum_{i= 1}^k f(t_i) (t_i - t_{i-1})$.
Hence
$S_P - s_P = \sum_{i= 1}^k (f(t_i) - f(t_{i-1})) (t_i - t_{i-1})$
Let $\delta = \max\{t_i - t_{i-1}; i = 1,\dots,k\}$.
Then
$S_P - s_P \le \delta\sum_{i= 1}^k (f(t_i) - f(t_{i-1})) = \delta (f(b) - f(a))$
Hence $S_P - s_P$ can be arbitrarily small.
Let $\Phi$ be the set of partitions of $[a, b]$.
Let $s = \sup\{s_P; P \in \Phi\}$.
Let $S = \inf\{S_P; P \in \Phi\}$.
It is easy to see that $s \le S$. Since $s_P \le s \le S \le S_P$, $s = S$. Hence $f$ is Riemann integrable. QED
Lemma 3 Let $(X, \mu)$ be a measure space. Suppose $\mu(X) < \infty$. Let $f$ be a measurable function on $X$. Suppose $0 \le f(x) \le M$ for every $x \in X$, where $0 < M < \infty$. Let $P\colon 0 = t_0 < t_1 <\cdots < t_{k-1} < t_k = M$ be a partition of $[0, M]$
Let $m_i = \inf\{F_{f}(x); x \in [t_{i-1}, t_i]\}$.
Let $M_i = \sup\{F_{f}(x); x \in [t_{i-1}, t_i]\}$.
Let $s_P = \sum_{i= 1}^k m_i (t_i - t_{i-1})$.
Let $S_P = \sum_{i= 1}^k M_i (t_i - t_{i-1})$.
Let $A_i = \{x \in X; t_{i-1} < f(x) \le t_i\}$.
Then
$S_P = \sum_{i= 1}^k \mu(A_i)t_i$.
$s_P = \sum_{i= 1}^k \mu(A_i)t_{i-1}$.
Proof: Note that $F_f(t)$ is a monotone non-increasing function and $F_f(M) = 0$. Hence for $i = 1,2,\dots k$,
$M_i = F_f(t_{i-1})$
$m_i = F_f(t_i)$
Hence
$S_P = \sum_{i= 1}^k F_f(t_{i-1})(t_i - t_{i-1})$
$s_P = \sum_{i= 1}^k F_f(t_i)(t_i - t_{i-1})$
$S_P = F_f(t_0)t_0 + (F_f(t_0) - F_f(t_1))t_1 + \cdots + (F_f(t_{k-2}) - F_f(t_{k-1}))t_{k-1} + F_f(t_{k-1})t_k = (F_f(t_0) - F_f(t_1))t_1 + \cdots + (F_f(t_{k-2}) - F_f(t_{k-1}))t_{k-1} + (F_f(t_{k-1}) - F_f(t_k))t_k = \sum_{i= 1}^k (F_f(t_{i-1}) - F_f(t_i))t_i = \sum_{i= 1}^k \mu(A_i)t_i$
Similarly
$s_P = \sum_{i= 1}^k \mu(A_i)t_{i-1}$ QED
Lemma 4 Let $(X, \mu)$ be a measure space. Suppose $\mu(X) < \infty$. Let $f$ be a measurable function on $X$. Suppose $0 \le f(x) \le M$ for every $x \in X$, where $0 < M < \infty$.
Then $F_f$ is Riemann integrable and $\mathcal{R}(F_f, [0, M]) = \int_X f \, d\mu$.
Proof: This is clear from Lemma 3 and this result.
Lemma 5 Let $[a, \infty)$ be an infinite interval of the real line, where $-\infty < a < \infty$. Let $f_n\colon [a, \infty) \rightarrow [0, \infty)$ be a real valued function for $n = 1, 2, \dots$.Suppose $f_n \le f_{n+1} (n = 1,2,\dots)$. Suppose each $f_n$ is Riemann integrable on every finite interval $[x, y]$, where $a < x < y < \infty$. Let $f = \lim_n f_n$. Suppose $f$ is Riemann integrable on every finite interval $[x, y]$, where $a < x < y < \infty$.
Then $\lim_n \mathcal{R}(f_n, [a, \infty)) = \mathcal{R}(f, [a, \infty))$.
Proof: By this question, each $f_n$ is Lebesgue measurable and $\mathcal{R}(f_n, [a, \infty)) = \int_{a}^{\infty} f_n dt$. By Lebesgue monotone convergence theorem, $\lim_n \mathcal{R}(f_n, [a, \infty)) = \int_{a}^{\infty} f \, dt$.
By this question, $f$ is Lebesgue measurable and $\mathcal{R}(f, [a, \infty)) = \int_{a}^\infty f \, dt$.
This completes the proof. QED
Lemma 5.5 Let $[a, \infty)$ be an infinite interval of the real line, where $-\infty < a < \infty$. Let $f\colon [a, \infty) \rightarrow [0, \infty]$ be a non-increasing function. Suppose $f$ is extended Riemann integrable(see Notations and Definitions). Then $f(t)$ is finite for every $t > a$.
Proof: Suppose $f(t_0) = \infty$ for some $t_0 > a$. Since $f$ is non-increasing, $f(t) = \infty$ on $[a, t_0]$. Hence $\mathcal{R}(f, [a, t_0]) = \infty$. This is a contradiction. QED
Lemma 6 Let $(X, \mu)$ be a measure space. Let $f$ be a measurable function on $X$. Suppose $0 \le f(x) \le M$ for every $x \in X$, where $0 < M < \infty$.
Then $F_f$ is extended Riemann integrable if and only if $f$ is integrable. Moreover, if this is the case, $\mathcal{R}(F_f, [0, M]) = \int_X f \, d\mu$.
Proof: For every integer $n \ge 1$, let $X_n = \{x \in X; f(x) > 1/n\}$. Let $f_{n}$ be the function defined on $X$ which is equal to $f$ on $X_n$ and is equal to $0$ outside $X_n$. Then $f_{n} \le f_{n+1}$ for $n = 1, 2, \dots$ and $f = \lim_n f_{n}$.
Suppose $F_f$ is extended Riemann integrable. Since $F_f$ is non-increasing, by Lemma 5.5, $\mu(X_n) < \infty$ for $n = 1, 2, \dots$. Since $F_{f_{n}}$ is non-increasing and bounded, $F_{f_{n}}$ is Riemann integrable on $X$ by Lemma 2. Hence
$\mathcal{R}(F_{f_{n}}, [0, M]) = \int_{X_n} f_n d\mu = \int_X f_n d\mu$ by Lemma 4. Hence
$\lim_n \mathcal{R}(F_{f_{n}}, [0, M]) = \lim_n \int_X f_n d\mu$
We evaluate the both sides of this equation.
LHS = $\mathcal{R}(F_f, [0, \infty))$ by Lemma 5.
RHS = $\lim_n \int_X f \, d\mu$ by Lebesgue monotone convergence theorem. Hence
$\mathcal{R}(F_f, [0, \infty)) = \int_X f \, d\mu$
Hence $f$ is integrable on $X$.
Conversely suppose $f$ is integrable on $X$. By Lemma 1, $\mu(X_n) < \infty$ for $n = 1,2,\dots$. Hence $F_{f_n}$ is Riemann integrable on $[0, M]$ and $\mathcal{R}(F_{f_n}, [0, M]) = \int_{X_n} f_n d\mu$ by Lemma 4. By the similar argument as above, $\mathcal{R}(F_f, [0, M]) = \int_X f \, d\mu$. Hence $F_f$ is extended Riemann integrable on $[0, M]$. QED
Lemma 7 Let $(X, \mu)$ be a measure space. Let $f_n\colon X \rightarrow [0, \infty]$ be a real valued measurable function for $n = 1, 2, \dots$ Suppose $f_n \le f_{n+1}$ for $n = 1, 2, \dots$ Let $f = \lim_n f_n$. Then
$F_{f_n} \le F_{f_{n+1}}$ for $n = 1, 2, \dots$
and
$F_f = \lim_n F_{f_n}$ on $[0, \infty)$.
Proof: Since $f_n \le f_{n+1}$, $\{x \in X : f_n(x) > t\} \subset \{x \in X : f_{n+1}(x) > t\}$. Hence $F_{f_n} \le F_{f_{n+1}}$ for $n = 1, 2, \dots$ Since $\{x \in X : f(x) > t\} = \bigcup_n \{x \in X : f_n(x) > t\}$, $F_f = \lim_n F_{f_n}$ on $[0, \infty)$. QED
Proposition Let $(X, \mu)$ be a measure space. Let $f\colon X \rightarrow [0, \infty]$ be a measurable function on $X$. Then $F_f$ is extended Riemann integrable on $[0, \infty)$ if and only if $f$ is integrable on $X$. If this is the case, $\mathcal{R}(F_f, [0, \infty)) = \int_X f \, d\mu$.
Proof: Suppose $F_f$ is extended Riemann integrable on $[0, \infty)$. Let $f_n(x) = \min\{f(x), n\}(n = 1,2,\dots)$. Then $f_n$ is bounded and $f_n \le f_{n+1} (n = 1,2,\dots)$ and $f = \lim_n f_n$. Since $F_f$ is extended Riemann integrable, each $F_{f_n}$ is extended Riemann integrable.
By Lemma 6, $f_n$ is integrable and $\mathcal{R}(F_{f_n}, [0, n]) = \int_X f_n d\mu$.
Since $\mathcal{R}(F_{f_n}, [0, n]) = \mathcal{R}(F_{f_n}, [0, \infty))$,
$\lim_n \mathcal{R}(F_{f_n}, [0, \infty)) = \lim_n \int_X f_n d\mu$.
We evaluate the both sides of this equation.
By Lemma 7, $F_{f_n} \le F_{f_{n+1}}$ for $n = 1, 2, \dots$ and $F_f = \lim_n F_{f_n}$.
Hence, by Lemma 5, $\lim_n \mathcal{R}(F_{f_n}, [0, \infty)) = \mathcal{R}(F_f, [0, \infty))$.
On the other hand, by Lebesgue monotone convergence theorem,
$\lim_n \int_X f_n d\mu = \int_X f \, d\mu$
Hence $\mathcal{R}(F_f, [0, \infty)) = \int_X f \, d\mu$.
Conversely suppose $f$ is integrable on $X$. Let $f_n(x) = \min\{f(x), n\}(n = 1,2,\dots)$. Then $f_n$ is bounded and $f_n \le f_{n+1} (n = 1,2,\dots)$ and $f = \lim_n f_n$. Since each $f_n$ is integrable, by Lemma 6, $F_{f_n}$ is extended Riemann integrable and $\mathcal{R}(F_{f_n}, [0, n]) = \int_X f_n d\mu$.
By Lemma 7, $F_{f_n} \le F_{f_{n+1}}$ for $n = 1, 2, \dots$ and $F_f = \lim_n F_{f_n}$. Hence, by Lemma 5, $\lim_n \mathcal{R}(F_{f_n}, [0, \infty)) = \mathcal{R}(F_f, [0, \infty))$. On the other hand, by Lebesgue monotone convergence theorem,
$\lim_n \int_X f_n d\mu = \int_X f \, d\mu$
Hence $\mathcal{R}(F_f, [0, \infty)) = \int_X f \, d\mu$. QED