You're close! This can indeed be done properly and is then called the Euler-Maclaurin formula. For this, you define the "shift to the left by n operator" e^(nD) where D is the differentiation operator d/dx.
You then always take the current value of f(x), multiply it by the small shift n to get the first rectangle. Then you shift to the left by n, i.e. to e^(nD)*f(x) = f(x+n), multiply that by the small shift n to get the next rectangle etc.
The book "street-fighting mathematics" [1][pdf] has a very hands-on and playful derivation of this in chapter 6.3.
[1] https://mitpress.mit.edu/books/street-fighting-mathematics
[pdf]https://www.dropbox.com/s/722rlvrwy9l9w73/7728.pdf?dl=1
The exponential of a matrix X is an infinite sum just like that of the normal exponential function except with operations being matrix multiplication, addition, and scalar multiplication (I is the identity matrix):
e^X = I + X + X^2/2 +X^3/6 +...
Now take X to be the matrix X = [0 -1; 1 0].
This is the matrix of the linear transformation of corresponding to multiplication by i if you consider C as a real vector space with basis 1,i (thus x+iy is identified with the vector [x; y]).Now you can compute that the matrix exponential
e^(tX)
is the rotation matrix [cos(t) -sin(t); sin(t) cos(t)].
The connection is now this: we can describe multiplication of a complex number z = x+iy by e^(ti) equivalently as the vector resulting from the linear transformation [cos(t) -sin(t); sin(t) cos(t)]*[x;y] = [x*cos(t) - y* sin(t); x*sin(t) + y*cos(t)]
In particular, if you take z = 1 you recover Euler's formula.To say briefly how this is a special case of the exponential map in Lie theory: the 1-d vector space spanned by X is the Lie algebra of the unit circle (which is a group) and the exponential map sends an element tX to e^(tX).
e^X could also be defined by \lim_{N \to \infty}(I + X/N)^N for X a linear map. For my intuition, I find that better than your definition.
e^1 is what you get if you repeteadly multiply 1 by (1 + 0.001)
e^i is also what you get if you repeatedly multiply 1 by (1 + 0.001i)
If the x in e^x = (1+x/N)^N is understood as some transformation, then e^x is essentially repeating an infinitesimal transformation lots of times. So it's like a for-loop where the body of the loop is some infinitesimal transformation.
I tried to define the integration operator in terms of e^x. The 1 + x/N needed to be one "infinitesimal" iteration of integration, that adds an extra infinitesimal rectangle to the area. But it didn't seem to work out.
Ultimately that helps to explain Euler's formula. For large N, 1+ix/N is an "infinitesimal" rotation by angle x/N. Repeating it N times produces a rotation of angle x. That's essentially what TFA says. And it's a special case of the Lie theoretic view of e^x.