Defining integrals by residue theorem I have always been interested in alternative definitions of mathematical objects. I wonder if one can craft an useful definition of definite integral by using the Residue Theorem from complex analysis. That is, defining the integral of a function $f$ (with some restrictions) as $$\int_{-\infty}^{+\infty} f(x) dx := 2\pi i \sum_{\operatorname{Im}(z_0) > 0} \operatorname{Res}(f,z_0),$$
where the sum is over all the residues $z_0$ of $f$ situated in the halfplane $\operatorname{Im}(z_0) > 0$. Of course, to make sense, this definition requires at least that $f(z)$ is meromorphic and decay fast enough for $z$ away from the real axis.
Are you aware of some attempt to define integrals in this (or similar) way?
 A: Defining integrals using certain integration formula is sometimes done to regularize divergent integrals. Now, as pointed out by Alexandre Eremenko in the comments, the use of the residue theorem would limit the applicability of the definition of an integral over the real line to a rather small class of functions. However, there exists a more general integration formula due to Glaisher for integrals over the real line, which is a special case of Ramanujan's master theorem:
If $f(x)$ is an even function with series expansion of the form
$$f(x) = \sum_{k=0}^{\infty}(-1)^k c_k x^{2k}$$
then
$$\int_{-\infty}^{\infty}f(x) dx = \pi c_{-\frac{1}{2}}\tag{1}$$ 
if this integral converges. This then needs a definition of the coefficients $c_k$ for non-integer $k$ which can be done using the rigorous formulation of Ramanujan's master theorem, but that would defeat the purpose of this attempt to get to an alternative definition of integrals. Instead, one can proceed in a more heuristic way, whenever a function is specified via some analytic expression of the $c_k$ involving e.g. factorials, the meaning of $c_{-1/2}$ won't usually pose problems.
A simple example to illustrate that (1) is more general than the residue theorem, we can take $f(x) = \exp\left(-x^2\right)$. This clearly is not a case where the residue theorem is applicable, although a derivation of the Gaussian integral using contour integration methods does exist. Since $c_k = \dfrac{1}{k!}$, we have $c_{-1/2} = \dfrac{1}{\sqrt{\pi}}$, Glaisher's method thus yields the correct result of $\sqrt{\pi}$.
