Suppose $\{a_n\}$ is a sequence of non-negative real numbers, $a_n = O(n^M)$ for a positive number $M$ and it's Dirichlet series $L(s)=\sum \frac{a_n}{n^s}$ has an analytic continuation to a meromorphic function on $\mathbb C$ with only a simple pole at a positive real number $a$ with residue $A$. Using a standard Tauberian theorem (if I'm not forgot a necessary condition) one can conclude that: $$\sum_{n\leq x} a_n = Ax^a + O(x^{a-\delta}). $$
My question is:
What is the maximum value of $\delta$ for which the above asymptotic formula works?
My motivation for this question was an effort to finding out the asymptotic of the number of lattice points in a circle with radius $\sqrt{N}$ with center at the origin which is closely related with Dedekind zeta function of $\mathbb Q[i]$. It turns out that this zeta function satisfies all of the above conditions for $a=1$ and $A=\frac{\pi}{4}$. So what is the best result one can obtain in this way?
There are many kinds of Tauberian theorems. In your particular setting what people mean by it is that they use the Mellin transform in a line of integration with real part $\sigma=\alpha+\frac{1}{\log x}$ and then shift the line of integration to the left of $\alpha$. There are three new integrals:two horizontal (which are the same basically) and one vertical. The former usually provide a small error term and the latter gives the main error term, meaning that if the new line of integration is on the line $\sigma=\alpha-\delta$ then one more or less has an error term of the form $O(x^{\alpha-\delta+\epsilon})$ for some $\epsilon>0$ depending on the behavior of the Dirichlet series in the region $\sigma>\alpha-\delta$. There is no automatic Tauberian theorem that gives you the resulting bound of this process in terms of the sequence $a_n$ however the process is very standard and it is easy to perform in particular examples. What I did not mention and is pretty important in this process is that you need to have good upper bounds for the growth of the Dirichlet series on the left of $\sigma=\alpha$. Lack of good bounds in this region is the reason one cannot get very good error terms even though the Dirichlet series can be analytically continued even further to the left. The reason one needs these bounds is that having better upper bounds reduces the value of $\epsilon>0$ in the error term above. For the specific application you have in mind the Dirichlet series is $$\zeta_{\mathbb{Q}(i)}(s)=\zeta(s)L(s,\chi_4),$$ where $\chi_4$ is the non--trivial Dirichlet character modulo $4$ and one therefore needs good upper bounds for $\zeta(s)$ when the real part of $s$ is close to $\frac{1}{2}$. This is related to Lindelöf's hypothesis which is a weak version of Riemman's hypothesis but still far away from being proved. There are other techniques which quickly yield a better error term than the one you would get by a Tauberian argument, the simplest being Voronoi's summation (which gives $\alpha=1$ and allows any value $\delta>\frac{2}{3}$ in your notation). The best record for the error term in this application is due to Huxley and uses elementary techniques based on lattice point counting, perhaps it is not directly trivial to go through all the details in his paper though.