I have recently discovered the relation
\begin{equation} \frac{\mathrm d^2}{\mathrm dx^2} \big| x \big| = 2\delta (x). \end{equation}
I was very intrigued when I found this expression, and as it makes sense to me intuitively. However, I am aware that Dirac's delta "function" is defined as a distribution, not a function in the conventional sense, so there is probably more going on here than meets the untrained eye.
So my question is, what caveats are necessary for the above equation for it to be formally correct? Can it be taken literally?
I would have presented a definition of the delta function for completeness, but I am also not certain which definition is appropriate in this context. Am I correct in my understanding that the piecewise definition
\begin{equation} \delta (x) \equiv \begin{cases} \infty, & \operatorname{if} x = 0 \\ 0, & \operatorname{if} x \neq 0 \end{cases} \end{equation}
Is only an informal, intuitive definition and actually an "abuse of notation" of proper functions?
I have knowledge up to multivariable/vector calculus and differential equations, but no formal or distribution theory, analysis, number theory, etc. training. Please accommodate if appropriate.
[I apologize for the formatting issues, I am genuinely trying to learn. Can someone please point me in the direction of a crash course for LaTeX (particularly math)? I've looked around a lot on SE and elsewhere on the web and I'm having trouble finding tutorials that explain the simplest of things, like when to use the dollar sign and when to use the double dollar, how to write dollar signs without them taking effect, when to use a package in the preamble, if the preamble is a specific location or just anything before the expression to be formatted, etc. Sorry for the meta question.]