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?
No. Such an approximation is impossible.
Consider the point $x = b$.
Let $\epsilon \in (0,b/8)$ be arbitrary. For every $p$, by continuity, there exists a $\delta \in (0,b/4)$ such that for every $y\in (b-\delta,b+\delta)$, we have
$$ |f(b,p) - f(y,p)| < \frac{b}{8} $$
On the other hand, we have that
\begin{align} b - \delta/2 &= | g(b+\delta/2) - g(b-\delta/2) |\\ &\leq |g(b+\delta/2) - f(b+\delta/2,p)| + \\ &\qquad |f(b+\delta/2,p) - f(b-\delta/2,p)| + |f(b-\delta/2,p) - g(b-\delta/2)| \end{align}
by triangle inequality, which implies that
$$ 4 \epsilon < \frac{b}{2} < | g(b+\delta/2) - f(b+\delta/2,p) | + |f(b-\delta/2,p) - g(b-\delta/2)| $$
In fact, the proof above shows that for any continuous function $h$, the inequality $$ \sup_{x\geq 0} |h(x) - g(x)| > \frac{b}{4} \tag{1}$$ always holds; and hence the inequality you want cannot be true.
Note, equation (1) is far from sharp. In fact, one can show that for any $\eta > 0$ there is an analogue of (1) with the right hand side replaced by $b/2 - \eta$.