In physics is quite common to find integrals of the type \begin{align} I(\beta) = \int_{-\infty}^{\infty}\text{d}x \frac{f(x)}{1+e^{\beta x}} \tag{1} \end{align} where $f(x)$ is some quantity we want to average over the Fermi-Dirac distribution $n(x) = \left(1+e^{\beta x}\right)^{-1}$, and $\beta >0$ is a positive real parameter representing the the 'inverse of the temperature'. Since many times physicists are only interested in the 'low temperature' regime $\beta\gg 1$, it is common to consider the following Sommerfeld approximation: \begin{align} I(\beta)\underset{\beta \gg 1}{=} \int_{-\infty}^{0}\text{d} x~f(x)+\frac{\pi^2}{6\beta^2} f'(0)+O(\beta^{-4}). \tag{2} \end{align} Which sometimes appears in a mnemonic fashion as an expansion for $n(x,\beta)$ itself, \begin{align} \frac{1}{1+e^{\beta x}}\underset{\beta\gg1}{=} \theta(-x)-\frac{\pi^2} {6\beta^2}\delta'(x)+O(\beta^{-4}) \tag{3} \end{align}
My question is
Can we understand Eq. (3) in a rigorous fashion? E.g. as the expansion of a distribution. If yes, can we understand the convergence of Eq.(2) as the condition for a series expansion under integral sign? E.g. dominated convergence.
My motivation
I need to study an integral similar to Eq. (1) but with the crucial difference that f(x) is also a function of the parameter $\beta$, and wanted to make a similar expansion as in Eq. (2). My idea was to understand Eq. (2) as a series expansion Eq.(3) under integrals sign, and also expand my $f$ in $\beta$. To check if this is safe, I wanted to use dominated convergence. But I am not confident this makes sense.
References for rigorous discussions of Eq. (2) or Eq. (3) are welcome.
To justify the Sommerfeld expansion let assume that $f$ is a suitable testfunction (something like a Lorentzian should be good for now: integrable at $0$ and a sufficent decay at infinity). Furthermore let us denote the Fermi distribution by $n_{\beta}(x)$.
We want to explore the integral
in the limit of $\beta\gg1$.
Now, let us rescale $x\rightarrow \beta x$ and split the range of integration at the origin
$$ \beta I(\beta)=I_{+}(\beta)+I_{-}(\beta)=\int_0^{\infty}\frac{f(x/\beta)}{e^x+1}dx+\int_{-\infty}^0\frac{f(x/\beta)}{e^x+1}dx $$
Since $e^{x}<1$ on $\mathbb{R}_-$ we find
$$ I_-(\beta)=\int_{-\infty}^0f(x/\beta)dx+\int_{-\infty}^0dx(f(0)+\frac{x}{\beta}f'(0)+O{(\beta^{-2})})\sum_{n\geq 1}(-1)^ne^{n x}=\\\int_{-\infty}^0f(x/\beta)dx-\log(2)f(0)+\frac{\pi^2}{12\beta}f'(0)+O(\beta^{-2}) $$
Since on $\mathbb{R}_+$ the integral converges pretty fast we can expand $f$ directly and find
$$ I_+(\beta)=\int_0^{\infty}\frac{f(0)+\frac{x}{\beta}f'(0)+O{(\beta^{-2})}}{e^x+1}dx=\log(2)f(0)+\frac{\pi^2}{12\beta}f'(0)+O(\beta^{-2}) $$
which yields (after undoing the rescaling from the beginning)
$$ I(\beta)=\int_{-\infty}^{0}f(x)dx+\frac{\pi^2}{6\beta^2}f'(0)+O(\beta^{-3}) $$
which is in the sense of distributions can indeed be interpreted as
that $O(\beta^{-3})$ can be replaced by an $O(\beta^{-4})$ estimate is straightforward to include
Remark: If we allow a temperature dependence for $f$, so $f_{\beta}(x)$ Sommerfeld should be valid as long as we can assure that a Taylor expansion around the origin (in $x$) is valid, so $f_\beta(x/\beta)\sim f_{\beta}(0)+\frac{x}{\beta}f_{\beta}'(0)...$ where $f_{\beta}^{(n)}(0)$ are at least as such that $f_{\beta}^{(n)}(0)/\beta^n \rightarrow 0$ as $\beta\rightarrow \infty$