Prove that $$\large\int \limits_{1}^{\infty}\Bigg(\dfrac{1}{\lfloor{x}\rfloor}-\dfrac{1}{x}\Bigg)dx=\lim \limits_{n \to \infty} \Bigg(-\ln(n) + \sum \limits_{k=1}^n\dfrac{1}{k}\Bigg)$$
I was reading an article on Euler–Mascheroni constant$\Big(\gamma\approx0.577215664901532\Big)$, when I read that it is defined as the limiting difference between the harmonic series and the natural logarithm :
$$\gamma=\lim \limits_{n \to \infty} \Bigg(-\ln(n) + \sum \limits_{k=1}^n\dfrac{1}{k}\Bigg)$$
That is completely fine, but in the next "step" this limit is equated to a definite integral of reciprocal of $x$ subtracted from the reciprocal of floor of $x$.
It can not really understand this transition from limit to a definite integral. Also, I could not find even a single proof of this equivalence anywhere. A geometrical explanation (or even an algebraic one) will surely help me understand this.
Thanks in Advance ! :-)