There are a number of ways to do this formally; we really wish to talk about infinitesimals rather than $0$. I will describe a simple approach and a more sophisticated one in this post. However, before that, I think it's worth noting that there is some historical precedent for doing this sort of thing (though it, rightfully, would never live up to modern standards of proof) and interesting insights can be found - indeed, I once (but cannot seem to relocate) found a proof due to Euler in which he lets $k$ be infinite and then uses the binomial theorem
$$(1+\frac{x}k)^k={k\choose 0}1+{k\choose 1}\frac{x}k+{k\choose 2}\frac{x}k^2+\ldots=1+\frac{k}{1!}\frac{x}k+\frac{k(k-1)}{2!}\frac{x^2}{k^2}+\ldots$$
and then figure that $\frac{1}k=0$ when it's convenient (i.e. when we're not going to multiply it by an infinite number later), so the above evaluates to
$$1+\frac{1}{1!}x+\frac{1}{2!}x^2+\ldots$$
which is a familiar result defining the exponential function. It's not formal, but it's certainly not without merit and can guide intuition, since the above is easily formalized. For more normal people, I think it's too often frowned upon to do things like what you did with $a^x$ - I did similar things too.
The first approach to a formal concept is a very simple algebraic construction. In particular, we want to add a new infinitesimal number to our arithmetic - and to only add one "layer" of infinitesimals. So, we'll let $\varepsilon$ be some symbol to represent our new "number" and we'll think of it as being some smidgen greater than $0$. Since $\varepsilon^2$ ought to be less than $a\varepsilon$ for any real $a$, but we wish to keep our system simple, we will consider it negligible and define $\varepsilon^2=0$ (but $\varepsilon\neq 0$).
We have now constructed the dual numbers. We will use the standard rules of arithmetic when dealing with them, applying the identity $\varepsilon^2=0$ when possible. Let's just compute some things using this - and we'll start with polynomials, because we need no additional definitions for that.
$$(x+\varepsilon)^3=x^3+3x^2\varepsilon + 3x\varepsilon^2 + \varepsilon^3 = x^3+3x^2\varepsilon$$
where we cancel out the latter three terms, since they are multiples of $\varepsilon^2=0$. Moreover, using the binomial identity and noticing that all but the first two terms will be multiples of $\varepsilon^2$, we can write
$$(x+\varepsilon)^n=x^n+nx^{n-1}\varepsilon.$$
Hey, doesn't that $nx^{n-1}$ term look familiar? We can, using the above, quickly get to the remarkable result that, if $f$ is a polynomial, then
$$f(x+\varepsilon)=f(x)+f'(x)\varepsilon$$
which makes sense. This simple states "the derivative measures how much an infinitesimal change in input affects the output". Moreover, the above expression is exactly that linear approximation for $f(x+\varepsilon)$ taken at $x$. What's remarkable here is that there is never a limit involved - everything here is purely algebraic.
However, your computations with $e^x=1+x+\frac{1}2x^2+\frac{1}6x^3+\ldots$ can easily be used to establish, for of all, that $$e^{x+\varepsilon}=e^x+e^x\varepsilon$$
where we once again get the form $f(x+\alpha \varepsilon)=f(x)+\alpha f'(x)\varepsilon$ by algebraic methods (if we expand every $(x+\alpha \varepsilon)^n=x^n+\alpha nx^{n-1}\varepsilon$). Moreover, you could easily extend any function less amenable to algebraic methods by defining $$f(x+\alpha \varepsilon)=f(x)+\alpha f'(x)\varepsilon$$
and then, when you compose, multiply, and add such functions together, the above will still hold.
Now, we do still run into an issue when we get expressions like $$\frac{f(x+\varepsilon)-f(x)}{\varepsilon}$$
since $\varepsilon$ has no multiplicative inverse (i.e. no dual number $x$ such that $x\varepsilon=1$ exists), so division can't be done simply. However, if we compute the above and receive
$$\frac{\varepsilon f'(x)}{\varepsilon}$$
which can be seen as asking for the solution to $z\varepsilon = \varepsilon f'(x)$ (since division is the inverse of multiplication), so we could reasonably assign any value of the form
$$f'(x)+\alpha \varepsilon$$
to the above quotient (since multiplying by $\varepsilon$ will vanish the $\alpha\varepsilon$ term) - which we can interpret as meaning "we are able to determine how quickly $f$ is changing - that is $f'$ - but we are unable to determine how quickly this quantity ($f'$) is changing (i.e. $f''$)."
The real beauty of this is that, firstly, it is algebraic, and secondly, it avoids any infinite sums of powers of $0$ (as you use) or anything like that - it always characterizes things as a sum of reals and a coefficient of $\varepsilon$. This makes it really easy to make a computer use and hence allows code that usually handles only real numbers compute derivatives too (which is useful when a system does not admit a closed form but can be simulated in a numerically stable way).
However, we could extend this further; if we put $\varepsilon^3=0$ and $\varepsilon^2\neq 0$, we would start tracking information about the second derivative and $f(x+\varepsilon)$ would then equal $f(x)+f'(x)\varepsilon+\frac{1}2f''(x)\varepsilon^2$ - and so on. Indeed, to truly take this thought to the extreme, one could say that every power of $\varepsilon$ is non-zero, and then it becomes perfectly reasonable to include $\frac{1}{\varepsilon}$ as a value too - and then we end up with quotients involving these infinitesimals being perfectly reasonable and only differing infinitesimally from the true answer. Largely, we can work intuitively with this new field, although if we define $e^x=1+x+\frac{1}{2!}x^2+\ldots$ or something like that, we do run into topological issues about what convergence means in a space like this (though algebra works just the same as it did before).
Essentially, taking this direction to the extreme we end up working in the hyperreal numbers, which are an extension of the real numbers with new infinite elements - and they are a model of the same axioms as the real numbers, which means, vaguely, if a statement is true for real numbers, it is also true for hyperreal numbers. This is the primary object of study of non-standard analysis and is an intuitive idea in nature, but it is much harder to state precisely than what I present above.