In reference to https://math.stackexchange.com/a/51467/356443
I don't understand the details of the Hecke summation trick in order to define an Eisenstein Series of weight $2$.
For convergence issues, we can't just define $$ E(z) = \sum_{c, d}'' \dfrac{1}{(cz+d)^2}. \qquad (z \in \mathbb{H}) $$ The trick is to consider $$ E(z,s) = \sum_{c, d}'' \dfrac{1}{(cz+d)^2 |cz+d|^{2s}}, \qquad (z\in\mathbb{H}; \Re(s) > 0) $$ and try to find an analytic continuation for $s$. This justifies setting $s=0$ to get a holomorphic function that should satisfy the right transformation rule.
It is noted that it is not always possible to continue $E(z,s)$ analytically. In the cases that such an analytic continuation does exist, what is the strategy for the computation to construct such a continuation?
In response to your question in the last paragraph, there are at least two strategies in the literature to obtain the analytic continuation of $E(z,s)$ (which, by the way, really should read $E_2(z,s)$ to remind oneself of the exponent of $2$ in the series, the weight) to $s=0$. One is by writing $E_2(z,s)$ as the Mellin transform of a suitable theta function - this is analogous to Riemann's famous proof of the analytic continuation (and functional equation!) of the Riemann zeta function, and the key technical tool is the Poisson summation formula. As pointed out in the comments, this is explained, e.g., in Diamond--Shurman, 4.10, and at least in the weight zero case, is Exercise 1.6.2 in Bump's "Automorphic forms and representations".
The second approach would be to compute the Fourier expansion of $E_2(z,s)$ and to verify the analytic continuation as well as the functional equation on the level of Fourier coefficients. Again, the Poisson summation formula is key to this. This is explained in great detail, but again in the weight zero case only, in Bump, 1.6, and in Zagier's Introduction to modular forms, 3.A, and probably in many other places as well.
However, if, as it would seem, you really are only interested in understanding what the value at $s=0$ of $E_2(z,s)$ is, you neither need to know Mellin transforms, nor Poisson summation, indeed not even analytic continuation at all. Instead, in that case Hecke's trick boils down to a skilful (but elementary!) computation of $\lim_{s\to 0^+}E_2(z,s)$ in terms of the (non-modular but holomorphic) $G_2(z)$. See Zagier's Elliptic modular forms and their applications, 2.3.