Proving $\forall A \subset X: f(A)\cap f_{\text{ess}}(X)=\emptyset \implies \mu(A)=0$ & How to think about proofs with essential range. I have had a very quick introduction to measure theory and haven't built up much intuition to guide the proofs I attempt.
I have been struggling for a while now to prove the following result which appears on the wiki page of essential range.
For a measurable function $f:(X,\mu)\to \mathbb{C}$ we have the following :
$\forall A \subset X: f(A)\cap f_{\text{ess}}(X)=\emptyset \implies \mu(A)=0$
I'd like help in proving the above lemma, I suspect the above lemma is somewhat elementary but I just can't seem to draw any intuition from the symbolic definition of essential range.
$$
f_{\text{ess}}(X):=\bigg\{\omega \in \mathbb{C}: \forall \epsilon>0, \quad \mu\big(\{x\in X:|f(x)-\omega|<\epsilon\}\big)>0\bigg\}
$$
Also I would really appreciate any advice given on how one typically tackles these types of proofs in measure theory and/or how to think about proofs involving the essential range of a function.
In fact the wikipedia page linked above mentions that the essential range is the smallest closed subset such that the above theorem holds. I think this is a very nice way to conceptualise the essential range.
As always thank you for any input given.
 A: The concept of essential range is topological in nature. If $f : X \to Y$ where $X$ is a measure space with measure $\mu$ and $Y$ is a topological space, then the essential range of $f$ is the set $$\{y \in Y :\text{ for all open neighborhoods }U\text{ of }y, \mu(f^{-1}(U)) > 0\}$$
The definition you gave makes use of properties of $\Bbb C$ to hide the topological considerations. The idea is that the essential range consists of the values in $y$ near which $f$ spends a significant amount of time. The topology on $Y$ defines what it means to be "near". The measure on $X$ defines what a significant amount of time is (i.e., the measure is greater than $0$).
A point of $Y$ can be in the range, but not the essential range if $f$ visits the point, but only comes near it on a set of measure $0$. Conversely, the point can be in the essential range, but not in the range if $f$ approaches the point (significantly), but never takes it on.
A simple example is $$ f: [0,1) \to \Bbb R : t \mapsto \begin{cases}t&t > 0\\-1& t = 0\end{cases}$$
The range of $f$ is $\{-1\}\cup(0,1)$, while the essential range is $[0,1]$, including both $0$ and $1$ that are not in the range, but not including $-1$, which is in the range.

The key fact which makes your lemma work is that $\Bbb C$ is second-countable. That is, there is some countable basis $\scr B$ for its topology. For example, $\scr B$ could be the set of all balls of rational radius about centers with both coordinates rational.
Now, $f(A) \cap f_{\text{ess}}(X) = \emptyset$  is equivalent to
$$\forall a \in A, f(a) \notin f_{\text{ess}}(X)$$
which is equivalent to
$$\forall a \in A, \exists \epsilon_a > 0, \mu\left(\{x \in X : |f(x) - f(a)| < \epsilon_a\}\right) = 0$$
or using ball notation,
$$\forall a \in A, \exists \epsilon_a > 0, \mu\left(f^{-1}(B_{\epsilon_a}(f(a))\right) = 0.$$
Since each of the balls $B_{\epsilon_a}(f(a))$ is an open set containing $f(a)$, there is some $U \in \scr B$ with $f(a) \in U \subseteq B_{\epsilon_a}(f(a))$, since $\scr B$ is a basis. Note that $$\mu(f^{-1}(U)) \le \mu(f^{-1}(B_{\epsilon_a}(f(a)))) = 0.$$ For each $a \in A$, choose such a $U$ and let $B$ be the collection of all of them. Since $B \subseteq \scr B$, it has to be countable.
So $A \subseteq f^{-1}(f(A)) \subseteq f^{-1}\left(\bigcup_{U \in B}U\right)= \bigcup_{U \in B}f^{-1}(U)$ and thus
$$\mu(A) \le \mu\left(\bigcup_{U \in B}f^{-1}(U)\right) \le \sum_{U \in B}\mu\left(f^{-1}(U)\right) = \sum_{U \in B} 0 = 0$$
