A lot of proofs i have seen where people have proven Eulers formula, the first step have often been deriving $y=e^{ix}$ with the help of the chain rule and written it like $dy/dx=ie^{ix}$. According to all derivations I have seen for the chain rule formula it is assumed that the difference in the denominator $g(x)-g(a)\to 0$ (see image), where $x \to a$. For example this proof:

Here it is assumed that $(g(x)-g(a))\to 0$. If $g(x)$ for example was $e^{ix}$, the difference between $g(x)$ and $g(a)$ would go toward imaginary zero and therefore would the denominator also go towards imaginary zero which does not correspond to the definition of the derivative of any function. How is the chain rule formula derived for functions involving imaginary numbers?
Every real number could be considered as a complex number with its imaginary part being $0$
Thus the real zero and the complex zero are basically the same when considered as complex numbers.