I'm looking for a rigorous proof of an identity I came across many times (in the context of Gÿongy's lemma). Suppose $X$ and $Y$ are two r.v. We know that $\mathbb{E}\left[X|Y\right]$ is $\sigma(Y)$-measurable so there exist a function $\varphi$ such that $\mathbb{E}\left[X|Y\right]=\varphi(Y)$. We define $\mathbb{E}\left[X|Y=y\right] := \varphi(y)$.
The identity I'm after is then the following: $$ \mathbb{E}\left[X|Y=y\right] = \frac{\mathbb{E}\left[X\delta(Y-y)\right]}{\mathbb{E}\left[\delta(Y-y)\right]} $$
Where $\delta$ is the Dirac delta distribution.
I intuitively think this may be traced back to $$ p_\left[X|Y\right] = \frac{p_\left[X,Y\right]}{p_\left[Y\right]} $$ where $p_\left[X|Y\right]$ is the probability distribution of $\mathbb{E}\left[X|Y\right]$, $p_\left[X,Y\right]$ the joint probability distribution of $(X,Y)$, and $p_\left[Y\right]$ the marginal distribution of $Y$.
Any help would be appreciated.