Recall the definition for a derivative is
$$\frac{\mathrm{d}x(t)}{\mathrm{d}t}=\lim_{\Delta t\to 0}\frac{x(t+\Delta t)-x(t)}{\Delta t}$$
So if we insist on having discrete values of time, we get
$$\frac{\mathrm{d}x}{\mathrm{d}t}\approx\frac{x(t+\Delta t)-x(t)}{\Delta t}$$
Or if everything is in integer multiples of some interval, we have
$$\dot{x}\approx \frac{x(k\Delta t+\Delta t) - x(k\Delta t)}{\Delta t} = \frac{x_{k+1}-x_{k}}{\epsilon}$$
where we define $x_{k}=x(k\Delta t)$ and introduce $\epsilon=\Delta t$.
Now, the potential is a numerical approximation to an integral:
$$\int V(x)\,\mathrm{d}t \approx \sum V\left(\frac{x_{k+1}+x_{k}}{2}\right)\,\epsilon$$
where the argument is just the midpoint between $x_{k+1}$ and $x_{k}$. This is the rectangle method...
We can combine these terms together to get the desired result
$$\int\left(\frac{m\dot{x}^{2}}{2}-V(x)\right)\mathrm{d}t\approx\sum_{k}\left(\frac{m}{2}\left[\frac{x_{k+1}-x_{k}}{\epsilon}\right]^{2}-V\left[\frac{x_{k+1}+x_{k}}{2}\right]\right)\epsilon$$
And by basic arithmetic, we see the right hand side simplifies (using distributivity) to
$$\int\left(\frac{\dot{x}^{2}}{2m}-V(x)\right)\mathrm{d}t\approx\sum_{k}\left(\frac{m}{2}\frac{(x_{k+1}-x_{k})^{2}}{\epsilon}-\epsilon\cdot V\left[\frac{x_{k+1}+x_{k}}{2}\right]\right)$$
That concludes the derivation, I think...