Let $\mathbf{P}_X [A] := \frac{1}{2} \delta_0 (A) + \frac{1}{2} \int_{A \cap (0, \infty)} e^{-t} dt$ for $A \in \mathcal{B} (\mathbb{R})$. What is $\mathbf{E} [X]$?
I tried finding the density and computed $\mathbf{E} [X]$ as follows:
$F_X (x) = \mathbf{P} [X \le x] = \mathbf{P}_X [(-\infty, x]] = \tfrac{1}{2} \delta_0 ((-\infty, x]) + \frac{1}{2} (1 - e^{-x}) \mathbf{1}_{(0, \infty)} (x)$;
$f_X (x) = \begin{cases}\frac{1}{2} e^{-x}, & x > 0; \\0, & \text{else}.\end{cases}$
Hence, $\mathbf{E} [X] = \int_0^\infty x \cdot \frac{1}{2} e^{-x} d x = \frac{1}{2}$.
Is this solution correct? Is there a better approach?
Without resorting to densities (which as pointed out aren't entirely rigorous in this case since $P(X=0)=1/2$) you can use the fact that your random variable is non-negative and hence $$ EX=\int_0^\infty 1-F(x)\, dx=\int_0^\infty \frac{e^{-x}}{2}\, dx=\frac{1}{2}. $$