First of all, if we define a function $f:(-\infty,0]\to\mathbb R$ by $f(x)=x^2$, then it is not the case that $f(x)$ "equals" undefined when $x>0$. Rather, we would say that $f(x)$ is undefined when $x>0$, which simply means that $f$ is not defined at those points. The symbol $f(x)$ only makes sense in the context of when $x$ is a number in the domain of $f$, and outside of that context it has as much mathematical meaning as "-@4-sd:f" does.
Some authors require that for $f$ to be differentiable at a point $a$, it must be the case that $a$ is an interior point of the domain of $f$; that is, there must be an $r>0$ such that $f$ is defined on the interval $(a-r,a+r)$. Other authors define the derivative in a more general situation, e.g. if $a$ is a limit point of the domain of $f$.
According to the first definition of the derivative mentioned, $f$ is not differentiable at $0$. According to the second definition, $f$ is differentiable at $0$, and $f'(0)=0$.