Newton’s Second Law states
$$F \! \left( x \right) = m \frac{dv}{dt} $$
By the chain rule
$$\frac{dv}{dt} = \frac{dv}{dx} \frac{dx}{dt}$$
Notice that
$$ \frac{dx}{dt} = v $$
substituting
$$F \! \left( x \right) = m \frac{dv}{dx} \frac{dx}{dt} = m v \frac{dv}{dx}$$
treating \frac{dv}{dx} as differentials and integrating
$$F \! \left( x \right) \ dx = m v \ dv$$
$$\int_{x_0}^{x_f} \! F \! \left( x \right) \ dx = \int_{v_0}^{v_f} \! m v \ dv$$
$$\int_{x_0}^{x_f} \! F \! \left( x \right) \ dx = \left. \frac{1}{2} m v^2 \right|_{v_0}^{v_f}$$
Alternatively,
$$F \! \left( x \right) = m \frac{dv}{dt}$$
$$\int_{x_0}^{x_f} \! F \! \left( x \right) \ dx = m \int_{x_0}^{x_f} \! \frac{dv}{dt} \ dx$$
$$dx = \left ( \frac{dx}{dt} \right) \ dt = v \ dt$$
substituting
$$\int_{x_0}^{x_f} \! F \! \left( x \right) \ dx = m \int_{t_0}^{t_f} \! \frac{dv}{dt} v\ dt = m \int_{t_0}^{t_f} \! \frac{d}{dt} \left( \frac{1}{2} v^2 \right) \ dt$$
$$ \int_{x_0}^{x_f} \! F \! \left( x \right) \ dx = \left. \frac{1}{2} m v^2 \right|_{t_0}^{t_f} $$