Help proving generalized Jensen's inequality $\mathbf{E}[f(\cdot,X(\cdot))\mid \mathscr{G}] \geq f(\cdot,\mathbf{E}[X\mid\mathscr{G}](\cdot))$ I'm reading Meyer's seminal work Probability and Potentials (1966), in which he states the following "borrowed" theorem from Dubins "Rises and Upcrossings of Nonnegative Martingales" (1961).

LEMMA. (Generalized Jensen's inequality) Let $(\Omega, \mathscr{F}, \mathbf{P})$ be a probability space, $X$ an integrable random variable on this space, and $\mathscr{G}$ a sub-$\sigma$-field of $\mathscr{F}$. We shall denote by $Y$ a version of $\mathbf{E}[X\mid \mathscr{G}]$.
Let $f$ be a measurable mapping of $\Omega \times \mathbf{R}$ (with the natural product $\sigma$-field) into $\mathbf{R}$, such that
(a) The mapping $\omega \mapsto f(\omega,t)$ is $\mathscr{G}$-measurable for each $t\in\mathbf{R}$.
(b) The mapping $t\mapsto f(\omega,t)$ is convex for each $\omega \in \Omega$.
Suppose that the random variable $\omega \mapsto f(\omega,X(\omega))$ is integrable. We then have the inequality
  $$\mathbf{E}[f(\cdot,X(\cdot))\mid \mathscr{G}] \geq f(\cdot,Y(\cdot))\ \text{a.s.}$$

He indicates that one could prove the theorem for simple $X$ and then pass to a limit "which is a little more delicate than usual" and then omits the proof. As a side note, I have searched Dubins' paper and find nothing even remotely similar in it.
I don't see how assuming $X$ is simple would help, but here's what I've tried so far.
Proof. By the convexity assumption, for all $x,x_0,\omega$ we have
$$
f(\omega,x) \geq \partial_2 f(\omega,x_0)(x-x_0) + f(\omega,x_0)
$$
where
$$
\partial_2 f(\omega,x_0) = \lim_{n\to\infty} \frac{f(\omega,x_0+1/n)-f(\omega,x_0)}{1/n}
$$
is the right-handed derivative in $f$'s second variable. Note that $\partial_2 f(\cdot,x_0)$ is a limit of $\mathscr{G}$-measurable functions and hence is as well, for each $x_0$. Now plug in $x=X(\omega)$, so we have
$$
f(\omega,X(\omega)) \geq \partial_2 f(\omega,x_0)(X(\omega)-x_0) + f(\omega,x_0)
$$
for all $x_0$. At this point I would like to condition both sides relative to $\mathscr{G}$ to get
$$
\mathbf{E}[f(\cdot,X(\cdot))\mid \mathscr{G}](\omega) \geq \partial_2 f(\omega,x_0)(Y(\omega)-x_0) + f(\omega,x_0)
$$
for almost all $\omega$ in $\Omega_{x_0}$ with $\mathbf{P}(\Omega_{x_0})=1$, and hence for all $\omega \in \Omega^*$ where $\Omega^* = \cap_{q \in \mathbf{Q}} \Omega_{x_0}$ has full measure. Then for all $\omega \in \Omega^*$ I can take a sequence $q_n \searrow Y(\omega)$ to obtain
$$
\mathbf{E}[f(\cdot,X(\cdot))\mid \mathscr{G}](\omega) \geq f(\omega,Y(\omega))
$$
where here we make use of the local boundedness of $x_0 \mapsto \partial_2 f(\omega,x_0)$ given to us by convexity, and the continuity of $x_0 \mapsto f(\omega,x_0)$ also given to us by convexity.
I said like up in bold because I do not know that $\omega \mapsto \partial_2 f(\omega, x_0)X(\omega), \omega\mapsto \partial_2 f(\omega,x_0)$, and $\omega \mapsto f(\omega, x_0)$ are integrable, so I cannot just pull out the $\mathscr{G}$-measurable parts. Is there some way I can resolve this?
EDIT: It may be useful to note that $f$ is actually $\mathscr{G}\otimes \mathscr{B}(\mathbf{R})$-measurable: define $f_n(\omega,x) := f(\omega, d_n(x))$ where $d_n(x) = \inf\{ \frac{k}{2^n} : \frac{k}{2^n} \geq x, k \in \mathbf{Z}\}$. Then $\{ f_n \in B \} = \cup_{\frac{k}{2^n}, k \in \mathbb{Z}}( \{\omega:f(\omega,\frac{k}{2^n}) \in B\} \times [\frac{k}{2^n},\frac{k+1}{2^n}))$. The $f_n$ are demonstrably $\mathscr{G} \otimes \mathscr{B}(\mathbf{R})$ measurable and $f_n \to f$ by continuity of $f$.
 A: I think I've got it, thanks to @PhoemueX for the idea.
The key is that all I really need is that
$$
\mathbf{E}[f(\cdot,X(\cdot))\mid \mathscr{G}](\omega) \geq \partial_2 f(\omega,x_0)(Y(\omega)-x_0) + f(\omega,x_0)
$$
a.s., I don't need to necessarily get there by taking the conditional expectation relative to $\mathscr{G}$ of the previous
$$
f(\omega,X(\omega)) \geq \partial_2 f(\omega,x_0)(X(\omega)-x_0) + f(\omega,x_0).
$$
Instead, take any $G \in \mathscr{G}$ and compute
$$
\int f(\omega,X(\omega))1_G d\mathbf{P}(\omega) \geq
\int(\partial_2 f(\omega,x_0)(X(\omega)-x_0) + f(\omega,x_0))1_Gd\mathbf{P}(\omega)
$$
and since the integral on the left is finite, the one on the right can be split into the finite integral of its positive part, and the possibly infinite integral of its negative part. Thus the previous integral equals
$$
= \lim_n\int(\partial_2 f(\omega,x_0)(X(\omega)-x_0) + f(\omega,x_0))1_G 1_{|\partial_2 f(\omega,x_0)|, |f(\omega,x_0)| \leq n}d\mathbf{P}(\omega)
$$
which, since now $\partial_2f, f$ are bounded, we can then apply the condition expectation property for $X$ to the previous line
$$
= \lim_n\int(\partial_2 f(\omega,x_0)(Y(\omega)-x_0) + f(\omega,x_0))1_G 1_{|\partial_2 f(\omega,x_0)|, |f(\omega,x_0)| \leq n}d\mathbf{P}(\omega)
$$
and for the same reason as before (that reason being quasi-integrability, i.e. $\int h d\mu $ exists but may be infinite), the previous equals
$$
= \int(\partial_2 f(\omega,x_0)(Y(\omega)-x_0) + f(\omega,x_0))1_G d\mathbf{P}(\omega).
$$
Thus, we have shown that for all $G \in \mathscr{G}$
$$
\int f(\omega,X(\omega))1_G d\mathbf{P}(\omega) \geq \int(\partial_2 f(\omega,x_0)(Y(\omega)-x_0) + f(\omega,x_0))1_G d\mathbf{P}(\omega).
$$
Since the integrand on the right is itself $\mathscr{G}$-measurable, this implies the desired inequality
$$
\mathbf{E}[f(\cdot,X(\cdot))\mid \mathscr{G}](\omega) \geq \partial_2 f(\omega,x_0)(Y(\omega)-x_0) + f(\omega,x_0),
$$
even though the right side might not be integrable.
(If not, compare integrals over the $\mathscr{G}$-measurable set where the right side strictly exceeds the left to arrive at a contradiction.) The rest of the proof goes through.
