I'm looking for a "soft absolute value" function that is numerically stable. What I mean by that is that the function should have $\mp x$ asymptotes at $\mp\infty$ and behave smoothly in $[-1,1]$.
One easy solution is to integrate $\tanh(x)$, giving $f(x) = \ln(\cosh(x))$, but this formula leads to unnecessary numerical issues for large values of $\|x\|$. Any suggestion greatly appreciated!

Actually integrating the logistic function gives a better result in terms of numerical stability: $$ \int\left( \frac{2}{1+e^{-x}}-1\right) dx = 2J - x + C_1 $$ with $$ J = \int \frac{dx}{1+e^{-x}} = x + \int\frac{-e^{-x}dx}{1+e^{-x}} = x + \ln(1+e^{-x}) + C_2 $$ which put back in the former integral yields $$ f(x) = x + 2\ln\left(\frac{1+e^{-x}}{2}\right) \quad\text{with}\quad f(0)=0 $$
This is only stable for $x\in[0,+\infty)$, but fortunately $f$ is symmetric $$ f(-x) = -x + 2\ln\left( e^x\frac{e^{-x}+1}{2} \right) = f(x) $$ so numeric calculations can be made stable on $(-\infty,0]$.
In short, a numerically stable smooth absolute value function is: $$ f(x) = |x| + 2\ln\left(\frac{1+e^{-|x|}}{2}\right) $$