Can a Dirac delta function be a probability density function of a random variable?
As explained in Gortaur's answer a delta function cannot be the probability density function of a real random variable.
Nevertheless sums of delta functions can be viewed as the "missing link" between discrete and continuous random variables / probability distributions, in the following way:
If $X$ is a discrete random variable taking values $x_k\in{\mathbb R}$ $\ (k\in I$, $\ I$ a countable index set) with probabilities $p_k$ then one can replace the probability space $I$ with the probability space ${\mathbb R}$, provided with the probability measure $$\mu\ :=\ \sum_{k\in I} p_k \ \delta_{x_k}\ ,$$ where $\delta_x$ denotes a unit point mass at the point $x$. In this way $X$ now has become a real random variable. If $f:\ {\mathbb R}\to {\mathbb R}$ is a reasonable function then the expectation $E\bigl(f(X)\bigr)$ may be written as an integral: $$E\bigl(f(X)\bigr)\ =\ \int_{-\infty}^\infty f(x)\ d\mu(x)\ .$$
Wikipedia article on PDF implies that $\delta(x)$ can be used as a generalized PDF. The corresponding CDF would be the Heaviside (unit step) function as already mentioned. Expected value is 0; I would not really call that variable "random".
As far as I know, pdf of a random variable $X$ w.r.t Lebesgue measure $\mu$ is defined $\mu$-a.e. as a solution of $$ \mathsf P\{X\in A\} = \int\limits_Af(x)\mu(dx) $$ for all $A\in\mathcal B(\mathbb R)$ where the last integral is Lebesgue integral. For sure you can talk about an integration using $\delta$ function, but usually I mention that people distinguish distributions with densities only when talking about absolute continuous distributions. The distribution of $X\equiv0$ is not absolute continuous since $\mathsf P\{X\in \{0\} \} = 1$ while $\mu(\{0\}) = 0$.