Unfortunately, I don't understand your proof. I can give a proof of my own.
We want to show that the $\text{esssup}(f):= \inf\\{k\in\mathbb{R}: \mu(|f|>k)=0\\}$ is always smaller than the actual supremum.
To show this let $\sup(f)=M$. This means that for all $x\in \mathbb{R}$ we have that $f(x)\leq M$.
In particular this means that $\mu(|f|>M) = \mu(\emptyset)=0$. Therefore $M\in\\{k\in\mathbb{R}: \mu(|f|>k)=0\\}$ and so $M\geq \inf\\{k\in\mathbb{R}: \mu(|f|>k)=0$. This proves the claim.
To show that $\text{esssup}(f) \geq \text{essinf}(f)$:
Let $\text{esssup}(f)=M$, $\text{essinf}(f)=N$. This means that $\mu(|f|>M)=0$ and $\mu(|f|
If by contradiction $N>M$ then $$\mu(|f|