I'm not sure why you turn your indefinite integral into a definite one. What you should do (as I think you attempted) is consider when $x$ is in certain intervals.
For $-\infty<x\le 0$, $e^{-|x|}=e^{x}$, so $\int e^{-|x|}dx=\int e^{x}dx=e^{x}+C=e^{-|x|}+C$
For $0\le x < \infty$, $e^{-|x|}=e^{-x}$, so $\int e^{-|x|}dx=\int e^{-x}dx=-e^{-x}+C=-e^{-|x|}+C$
To express this in a simple formula, we can make use of the signum function, which is defined to be $-1$ when $x<0$, $0$ at $x=0$ and $1$ when $x>0$. Clearly, your antiderivative can be expressed as $$\int e^{-|x|}dx=-sgn(x)e^{-|x|}$$
This is also a consequence of the fact that $sgn(x)=\frac{x}{|x|}=\frac{d}{dx}|x|$; can you see why?