I think the expression $$-\left\lfloor e^{-u(t)^2}-1\right\rfloor$$ will do the trick. Here "$\lfloor\cdot\rfloor$" is the greatest integer function.
To check this, note that if $u(t)=0$, the expression's value is $-\lfloor e^0-1\rfloor = -\lfloor 0\rfloor = 0$.
On the other hand, note that if $u(t)$ is nonzero, then $$0