Measurability of essential supremum of function of two variables Let $(X,d)$ be a separable metric space with Borel measure $\mu$. Let $f:X \times X \to \mathbb{R}$ be Borel measurable with respect to the product measure on $X \times X$, and let $g(x)=\operatorname{ess sup}_{y \in X} f(x,y)$. Is $g(x)$ necessarily measurable? (Is there some argument that can be pieced together using separability of $X$ and Lusin's Theorem, if we assume that $\mu$ is a Radon measure?)
 A: You are right. For each $n$ choose a set of measure less than $1/n$ on the complement of which $f$ is continuous. Now take the actual sup on each vertical section of this restricted function. This yields a measurable function $f_n$ for each $n$ defined on $X$. The sup of the increasing sequence of $f_n$ will also be  a measurable function $F$. Except for a null set, $F$ will give the $\operatorname{esssup}$ of the vertical section of $f$. So modifying $F$ on a null set yields that $g$ is measurable.
A: For the record, here is a simple answer based on Tonelli/Fubini's theorem.
For arbitrary $c \in \mathbb R$, the set $M_c := \{(x,y) \in X \times X \mid f(x,y) > c\}$ is measurable, thus the indicator function $\chi_{M_c}$ is measurable (everything w.r.t. the product measure). Tonelli/Fubini's theorem tells us that $h \colon X \to [0,\infty]$,
$$h_c(x) := \int_X \chi_{M_c}(x,y) \, \mathrm d y \qquad \forall x \in X,$$
is measurable.
Finally,
$$
\{ x \in X \mid g(x) > c \}
=
\bigl\{ x \in X \bigm| \mu(\{y \in X \mid f(x,y) > c \}) > 0 \bigr\}
=
\{ x \in X \mid h_c(x) > 0 \}
$$
is measurable for all $c \in \mathbb R$.
Thus, $g$ is measurable.
A: I am not sure, which one you mean by $\mathrm{ess}\inf$?
1) The essential infimum of the (parametric) function $h_i: x\mapsto f(i,x)$, i.e. the element in $X$, that is the almost-sure greatest lower bound of $h_i$?
I think this is the case you tried to prove. I do not know however, how it compares to the second case:
2) Or the essential infimum of the set of functions $\{g_i\}_{i\in X}$ with $g_i: x\mapsto f(x,i)$? I.e. the measureable function from $X$ to $\mathbb{R}$, that is the almost-sure greatest lower bound of the set of functions $\{g_i\}_{i\in X}$?
I think in this case, by the definition of the essential infimum of a collection of measurable functions, it is always measureable. 
