The factor $\frac12$ comes in because we're integrating the equation
$$
\frac{\mathrm dE}{\mathrm dv}=mv
$$
once.
Less abstract and only using basic arithmetics, the story goes like this:
When accelerating a body by applying a (constant) force $F$ along a distance $\Delta s$, the body gains energy according to
$$
\Delta E=F\Delta s
$$
which is just the definition of (mechanical) work.
According to Newton's second law $F=ma$. We also have $\Delta s \approx v\Delta t$ and thus
$$
\Delta E\approx mav\Delta t
$$
This relationship is only approximate because during any finite time interval $\Delta t$, the value $v$ changes as the whole point of the exercise was accelerating the body.
Now, as $a\Delta t=\Delta v$ we have
$$
\Delta E \approx mv\Delta v
$$
But where does the factor $\frac12$ come in? From basic calculus:
$$
\Delta(v^2)=(v+\Delta v)^2-v^2=2v\Delta v+(\Delta v)^2\approx 2v\Delta v
$$
which yields
$$
\Delta E\approx\frac12m\Delta(v^2)=\Delta(\frac12 mv^2)
$$
and thus
$$
E\approx\frac12 mv^2 + \mathrm{const}
$$
If we go from finite to infinitesimal time intervals, the equations become exact and we no longer need to assume a constant force.
A short introduction to differential calculus as relevant to this particular example:
At time $t = t_0$ the body has a velocity $v(t_0)=v_0$. After a time $\Delta t$, the body has the velocity $v(t_0+\Delta t)=v_0 + \Delta v$.
The value of $v^2$ at time $t=t_0$ is of course $v^2(t_0)=v(t_0)^2=v_0{}^2$. What's the value of $v^2$ at time $t=t_0+\Delta t$?
$$
v^2(t_0 + \Delta t)=v(t_0+\Delta t)^2 = (v_0+\Delta v)^2
$$
On the other hand, we also have
$$
v^2(t_0 + \Delta t) = v^2(t_0) + \Delta(v^2) = v_0{}^2 + \Delta(v^2)
$$
and thus
$$
\begin{align*}
\Delta(v^2) &= (v_0 + \Delta v)^2 -v_0^2 \\
&= v_0^2 + 2v_0\Delta v + (\Delta v)^2 - v_0{}^2 \\
&= 2v_0\Delta v + (\Delta v)^2
\end{align*}
$$
We're interested in the instantaneous values, ie the change as we take the limit $\Delta t \rightarrow 0$.
This means that $\Delta v$ becomes arbitrarily small as well and we're in particular able to ignore higher powers like $(\Delta v)^2$ and get
$$
\Delta(v^2)\approx 2v_0\Delta v
$$
or
$$
\frac{\Delta(v^2)}{\Delta v}\approx 2v_0
$$
This procedure is so useful that it got its own formalism and symbolic notation
$$
\frac{\mathrm{d}(v^2)}{\mathrm{d}v}=2v
$$
after taking the limit $\Delta v\rightarrow 0$.