The discontinuous function I want to approximate is defined as $x \mapsto g(x) : \mathbb{R}_+\mapsto \mathbb{R}_-$ with $g(x) := -x\mathbb{1}_{x < b}$ where $b > 0$ is some given real number.
I want to approximate this function on the whole nonnegative real line by a smooth function, $f$. $f$ has to satisfy $f(0,p) = 0$ for every $p$. Here $p$ is some real-valued parameter. So $f(\cdot,p)$ can be considered a family of functions indexed by $p$. This approximation should be such that for every $\varepsilon > 0$ I should be able to find a $p$ with $$\sup_{x\geq 0} \lvert f(x,p) - g(x)\rvert < \varepsilon$$
Can such an approximation exist? If yes, can someone give a few examples?