In electromagnetism, we say that any conservative electric field $\vec{E}(\vec{r})$ is associated to a scalar potential $V(\vec{r})$ such that $\vec{E}(\vec{r}) = -\nabla V(\vec{r})$. If the electric field is continuous, the respective electric potential must be differentiable because, if not, its gradient could not be calculated everywhere.
There are some cases, though, in which the electric field is discontinuous, leading to a non-differentiable electric potential. The latter is, however, still continuous.
Why is this? Why is it that even when the electric field is discontinuous, the electric potential is not? Must the electric potential always be continuous everywhere? A mathematical approach (i.e. not just a qualitative insight) is what I'm looking for.