The Ramanujan interpolation formula states:
$$\int_0^\infty x^{s-1}\sum_{n=0}^\infty f(n) (-x)^n dx=\pi\csc(\pi s)f(-s)$$
therefore we use the Mellin inversion:
$$\text M_s\left(\sum_{n=0}^\infty f(n) (-x)^n\right)= \pi\csc(\pi s)f(-s)\iff \sum_{n=0}^\infty f(n) (-x)^n=\text M^{-1}_x( \pi\csc(\pi s)f(-s))$$
Next, one expands the inverse Mellin transform and sets $x=1$ or $f(n)x^n\to f(n)$. Finally, set the integration variable to $z$:
$$\boxed{\sum_{n=0}^\infty f(n) =\frac12\int_{c-i\infty}^{c+i\infty}(-1)^{-z}\csc(\pi z)f(-z)dz=-\frac12\int_{c-i\infty}^{c+i\infty}(\cot(\pi z)+i)f(z)dz}\tag 1$$
$(1)$ works for $f(n)=\frac{\ln(n+1)}{(-2)^n}$ and other functions, but diverges $f(n)=e^{-n^2}$. The Mellin inversion article states gives conditions on the Mellin transform of $f(x)$, but not exactly $f(x)$ itself. What $(1)$’s conditions on $c,f(n)$?