f measurable function then $E=\left\{x\in X:f(x)=0\right\}$ is measurable set. Let $(X,m)$ measure space.
Let $f:X\to \mathbb{R}$ measurable function.
Show that $E=\left\{x\in X: f(x)=0\right\}$ is a measurable set.

I have this definition.
If $X$ is a measurable space, $Y$ is a topological space, and $f$ is a mapping
of $X$ into Y, then f is said to be measurable provided that $f^{-1}(V)$ is a
measurable set in X for every open set $V$ in $Y$.

Now, $E=f^{-1}(\left\{0\right\})$ but $\left\{0\right\}$ is not open...
Why is E measurable?
$\{0\}$ is not open, but it is measurable in the Borel $\sigma$-algebra on $\mathbb R$.

Let $(E, \mathcal E)$ and $(F, \mathcal F)$ be measure spaces. Then $f: E \to F$ is measurable iff $f^{-1}(A) \in \mathcal E$ for all $A \in \mathcal F$. This is the most general definition of a measurable function: note it doesn't require any topology on either set. But checking this property for every single element of a $\sigma$-algebra is hard. A key theorem is the following:

If $\mathcal T$ generates $\mathcal F$, i.e. $\sigma(\mathcal T) = \mathcal F$, then $f$ is measurable as long as $f^{-1}(A) \in \mathcal E$ for all $A \in \mathcal T$.

This is a simple application of the fact that $f^{-1}$ preserves unions and complements. In particular, the Borel $\sigma$-algebra on a topological space $(X, \mathcal T)$ is generated by the open sets $\mathcal T$, hence the definition in Rudin. However the more general definition still holds. To see this explicitly in your case

$$ f^{-1}(\{0\}) = f^{-1}((\mathbb R \setminus \{0\}^C)) = \left( f^{-1}(\mathbb R \setminus \{0\}) \right)^c $$
hence is measurable as the complement of a measurable set. A similar proof proves the theorem.
Note that,
E = {0} $f$ $^{-1}$ = ($\bigcap_{n=1}^{\infty}(-\frac{1}{n},\frac{1}{n})$) $f^{-1}$ = $\bigcap_{n=1}^{\infty}$ (($-\frac{1}{n},\frac{1}{n})$$f^{-1}$).
But $f$ is measurable, and ($-\frac{1}{n},\frac{1}{n})$ is open in $\mathbb{R}$, for all n $\in$ $\mathbb{N}$. Then,
$\bigcap_{n=1}^{\infty}$ (($-\frac{1}{n},\frac{1}{n})$$f^{-1}$)  is measureble in X, namely, $E$ is measurable in X.