In order to test my understanding of the Voronoï summation formula, I tried to apply it to a simple estimation of partial sums of Fourier coefficients of cusp forms. The result I obtained cannot possibly be true, but I do not see where the argument breaks down. Can someone spot the mistake in the argument below?
Let $\sum_{n\geq1}\lambda(n)e(nz)$ be a cusp form of weight $1$. I will be working with the weighted sum $$S=\sum_{n\geq1}\lambda(n)f\left(\frac{n}{B}\right)$$ where $f$ is a fixed smooth weight with support contained in the positive reals, so the above sum is a smooth model of the sum $\sum_{1\leq n\leq B}\lambda(n)$. Naive heuristics suggest that $S\ll_{\varepsilon} B^{1/2+\varepsilon}$ for any $\varepsilon>0$, although my understanding is that Fourier coefficients of cusp forms sometimes (always?) exhibit greater-than-square-root cancellation, but one should still not be able to get better than $S\ll B^a$ for some $a>0$.
In order to estimate $S$ I will apply the summation formula stated here as Theorem A.4 (page 46). In our case one has $c=D=1$ and the formula yields $$S=\sum_{n\geq1}\lambda(n)\int_0^\infty f\left(\frac{x}{B}\right)J_0\left(4\pi\sqrt{nx}\right)dx\text{.}$$
I know estimate the inner integral. In order to do that I express it as the Fourier transform of a radial function in $\mathbb{R}^2$, using Lemma 4.17 of Iwaniec and Kowalski's Analytic Number Theory, which yields $$\int_0^\infty f\left(\frac{x}{B}\right)J_0\left(4\pi\sqrt{nx}\right)dx=\frac{1}{\pi}\widehat{g_B}(\mathbf{y})$$ for any $\mathbf{y}\in\mathbb{R}^2$ with $|\mathbf{y}|^2=4n$, and where $g_B(\mathbf{x})=f\left(\frac{|\mathbf{x}|^2}{B}\right)$.
We now have $$\widehat{g_B}(\mathbf{y})=\int_{\mathbb{R}^2}f\left(\frac{|\mathbf{x}|^2}{B}\right)e(-\mathbf{y}\cdot\mathbf{x})d\mathbf{x}=B\int_{\mathbb{R}^2}f\left(|\mathbf{x}|^2\right)e\left(-\sqrt{B}\mathbf{y}\cdot\mathbf{x}\right)d\mathbf{x}$$ by the natural change of variable. Now one may choose $\mathbf{y}$ so that the first coordinate $\mathbf{y}_1$ is $\gg\sqrt{n}$, and so integrating by parts $N$ times yields $$\widehat{g_B}(\mathbf{y})=\int\frac{\partial}{\partial x_1^N}f(|\mathbf{x}|^2)\frac{e(-\mathbf{y}\cdot\mathbf{x})}{(\sqrt{B}\mathbf{y}_1)^N}d\mathbf{x}$$. Now we estimate trivially; since $f$ has compact support one has $\frac{\partial}{\partial x_1^N}f(|\mathbf{x}|^2)$ and we obtain $$\widehat{g_B}(|\mathbf{y}|)\ll_N\frac{B}{(\sqrt{Bn})^N}\text{.}$$ Replacing this in the summation formula and using $|\lambda(n)|\ll n^\varepsilon$ we arrive at $S\ll_N B^{1-N/2}$. For all $N$. This sounds totally unbelievable, so... where is the mistake in the argument? Am I misunderstanding the Voronoï formula somehow?