myHeaviside[x_] := Which[x < 0, 0, x == 0, 1/2, x > 0, 1] Note that the derivative, computed as a limit, is properly a representation of a DiracDelta function (though its integral and higher derivatives might not be appropriately represented):
Limit[(myHeaviside[x + ε] - myHeaviside[x])/ε, ε -> 0] $\begin{cases} \infty & x=0 \\ 0 & \text{True} \end{cases}$