From measure $P_X$ and knowing that $P_X=\int f_X d\mu$, how to find $f_X$? If we know that $P_X=\int f_X \ d\mu$, where $\mu$ is another measure(could be lebesgue) and I know what I get from $P_X(B), \ \forall B\in \mathcal{B}(\mathbb{R})$, how can I deduce the function $f_X$?
Any help would be appreciated.

Edit: Some comments have suggested $\frac{d P_X(]-\infty,x])}{dx}=f(x)$, using the fundamental theorem of calculus. However, the only version I know is the following:

If $f:[a,b]\rightarrow \mathbb{R}$ is continuous, then $f$ is integrable, and the function $F$ given by $F(x)=\int^x_a f \ dm$ is differentiable for $x \in (a,b)$ with derivative $F'=f$. The measure $m$ is Lebesgue.

We usually define $F(x)=P_X(]-\infty,x])$. So, what changes do we need to do to the text of the above theorem to be able to apply it to the case  $F(x)=P_X(]-\infty,x])$?
Formally you can use

$$
f(x) = \mathsf{E}[ \delta(X-x)]
$$

where $X$ is the random variable, $x$ the values it can attain, and $\mathsf{E}$ the expectation value. Alternatively you can compute the cdf:

$$
cdf(x) = \mathrm{Prob}(X &lt; x) = \mathsf{E}[ \theta(x-X)]
$$

where $\theta$ is the Heaviside function. You can then obtain $f(x)$ by differentiating the $cdf$.
Formally you can use

$$
f(x) = \mathsf{E}[ \delta(X-x)]
$$

where $X$ is the random variable, $x$ the values it can attain, and $\mathsf{E}$ the expectation value. Alternatively you can compute the cdf:

$$
cdf(x) = \mathrm{Prob}(X &lt; x) = \mathsf{E}[ \theta(x-X)]
$$

where $\theta$ is the Heaviside function. You can then obtain $f(x)$ by differentiating the $cdf$.