Wikipedia informs me that
I tried considering f(x,n)=e−xn2 so that its Mellin transform becomes Mx(f)=n−2zΓ(z) so inverting and summing
However, this last integral (whose integrand has poles at z=0,12 with respective residues of −12 and 12) is hard to evaluate due to the behavior of the function as ℜ(z)→±∞ which makes a classic infinite contour over the entire left/right plane impossible.
How does one go about evaluating this sum?
This one is a direct evaluation of elliptic integrals. Jacobi’s theta function ϑ3(q) is defined via the equation ϑ3(q)=∞∑n=−∞qn2 Let 0<k<1 and k′=√1−k2 and we define elliptic integrals K,K′ via K(k)=∫π/20dx√1−k2sin2x,K=K(k),K′=K(k′) Then it is almost a miracle that we can get k in terms of K,K′ via the variable q=e−πK′/K using equations k=ϑ22(q)ϑ23(q) where ϑ2(q) is another theta function of Jacobi defined by ϑ2(q)=∞∑n=−∞q(n+(1/2))2 Also the function ϑ3(q) is directly related to K via ϑ3(q)=√2Kπ The proofs of (3) and (5) are given in the linked post on my blog.
The sum in the question is ϑ3(e−π) so that we have q=e−π. This implies that K′/K=1 so that k=k′ and from k2+k′2=1 we get k2=1/2. And then ϑ3(q)=√2Kπ=√2π⋅Γ2(1/4)4√π=Γ(1/4)π3/4√2 Now using Γ(1/4)Γ(3/4)=π/sin(π/4)=π√2 we get ∞∑n=−∞e−πn2=ϑ3(e−π)=4√πΓ(3/4) The value of K=K(1/√2) in terms of Γ(1/4) is evaluated in this answer.