I can calculate
\begin{equation*} \int_0^i ze^{z^2} dz=\frac{1}{2e}-\frac12, \end{equation*}
but why can I calculate this irrelevant to the path taken? Is this since it is analytic everywhere - if so, how would I go about verifying this? I can't see how to apply the Cauchy Riemann equations here since I don't know how I would break this into the sum of a real and complex component.
Let $f : \mathbb{C} \to \mathbb{C}$ be any complex-valued function over $\mathbb{C}$. let $u, v$ be its real and imaginary part:
$$f(z) = u(z) + i v(z)$$
Let $p, q \in \mathbb{C}$ be any two distinct points and $\gamma : [0,1] \to \mathbb{C}$ be any path in $\mathbb{C}$ joining $p$ to $q$. i.e
$$\gamma(0) = p,\; \gamma(1) = q$$ If one inspect the integral of $f$ over $\gamma$ carefully, one find:
$$\begin{cases} \Re\left[ \int_{\gamma} f dz \right] &= \int_{\gamma} u dx - v dy\\ \,\,\Im\left[ \int_{\gamma} f dz \right] &= \int_{\gamma} v dx + u dy\\ \end{cases}\tag{*1}$$ If we want the integral $\int_\gamma f dz$ independent of choice of $\gamma$ and depends only on the end points $p, q$, the two line integrals on RHS of $(*1)$ need to independent of choice of $\gamma$ too.
Using the Green's theorem, this will happen if $$ \begin{cases} \frac{\partial(-v)}{\partial x} - \frac{\partial u}{\partial y} &= 0\\ \frac{\partial u }{\partial x} - \frac{\partial v}{\partial y} &= 0\\ \end{cases} \quad\iff\quad \begin{cases} \frac{\partial v}{\partial x} + \frac{\partial u}{\partial y} &= 0\\ \frac{\partial u}{\partial x} - \frac{\partial v}{\partial y} &= 0\\ \end{cases} $$ But the two equations on the right is nothing but the Cauchy-Riemann equations.
So if $f$ is analytic (eg. your $z e^{z^2}$), then by definition it satisfies the Cauchy-Riemann equations. You can then use Green's theorem to deduce the integral $\int_\gamma f dz$ is independent of path $\gamma$. This is the core of the Cauchy's integral theorem.
Actually, this path independence can be used as an alternate definition of analyticity. Quoting wiki, Morera's theorm states that a continuous, complex-valued function ƒ defined on a connected open set $D \subset \mathbb{C}$ that satisfies $$\oint_\gamma f(z)\,dz = 0$$ for every closed piecewise $C^1$ curve $\gamma$ in $D$ must be holomorphic on $D$.
I hope this will clarify the relations among the path independence of $\int_\gamma f dz$, Cauchy Riemann equations, Green's theorem and Cauchy's integral theorem.