Dirichlet's divisor problem via Lambert series

For part 1 of the question, he would most likely have used the Euler-Maclaurin summation formula

$$ \sum_{n=1}^{\infty}\frac{1}{e^{nt} - 1} = \int_{1}^{\infty}\frac{dx}{e^{xt} - 1} + \frac{1}{2}\frac{1}{e^t - 1} + \int_{1}^{\infty}S(x)\left(\frac{d}{dx}\frac{1}{e^{xt} - 1}\right)dx $$

with $S(x)$ the sawtooth function. It is easy to obtain the leading term, because it comes from the first integral

$$ \int_{1}^{\infty}\frac{dx}{e^{xt} - 1} = \frac{1}{t}\int_{t}^{\infty}\frac{du}{e^u - 1} $$

by the change of variable $u = xt$. We have

$$ \int_{t}^{\infty}\frac{du}{e^u - 1} = \int_{t}^{1}\frac{du}{e^u - 1} + \int_{1}^{\infty}\frac{du}{e^u - 1}, $$ and $$ \frac{1}{e^u - 1} = \frac{1}{u} + \left(\frac{1}{e^u - 1} - \frac{1}{u}\right) $$ on $0 \leq u \leq 1$, so that $$ g(t) = \frac{1}{t}\log\left(\frac{1}{t}\right) + O\left(\frac{1}{t}\right). $$ But to get the second term looks harder, for the integral with the sawtooth function contributes to that term. To go further, one can integrate by parts in that integral, which is the standard approach, or write it as a sum of integrals over the intervals from $n$ to $n+1$. Also the sawtooth function has a simple Fourier expansion, which may help. I should remark that the integral with the sawtooth function is $O(1/t)$ as one sees when bounding it by passing the absolute value under the integral sign and using $|S(x)| \leq 1/2$. Anyway, I am pretty sure that part 1 is doable with some work.

Part 2 looks trickier. The Lambert series expansion

$$ \sum_{n=1}^{\infty}(1 + \mu(n))e^{-nt} = \frac{e^{-t}}{1 - e^{-t}} + e^{-t} = \frac{1}{t} + \frac{1}{2} + O(|t|) $$

is a little nicer than the one for the divisor function; not only are the coefficients nonnegative, but they are also bounded. Supposing that we have a Tauberian theorem strong enough to yield

$$ \sum_{n \leq x}(1 + \mu(n)) \sim x, $$

we would then have proved the Prime Number Theorem from the Lambert series. It seems a little unlikely that Dirichlet had such a strong Tauberian theorem; would he not have proved the Prime Number Theorem if he had? Of course, this argument by analogy is not conclusive, since the two situations differ by a factor of $\log(x)$.

We shall never know what argument Dirichlet had, and he may have found an approach that did not use a Tauberian theorem, perhaps exploiting special properties of the divisor function. It is worth noting that Voronoi's first proof of the error term $O(x^{1/3}\log(x))$ for the divisor problem was based on the Euler-Maclaurin summation formula.