I am trying to compute the expectation of $\mathbb{E}[XY]$ where $X$ and $Y$ are dependent on a third non-negative random variable $Z$.
I can now compute the expectation as follows
$$\mathbb{E}[XY]=\int_{0}^{\infty}\mathbb{E}[XY\mid Z=z]dF_{Z}(z)$$ I am also familiar with the equivalent representation
$$\mathbb{E}[XY]=\int_{0}^{\infty}\mathbb{E}[XY\mathbb{1}_{Z\in[z,z+dz)}]$$
where $\mathbb{1}_{A}$ is the indicator function on $A$. I am now wondering whether I can write this expectation as follows
$$\mathbb{E}[XY]=\int_{0}^{\infty}\mathbb{E}[XY\mathbb{1}_{Z=z}]dz$$
I do not want to assume that $Z$ has a density function. Could anyone tell me if this last representation is correct and perhaps provide a proof even?