In my research, I came up with a special function which I denote by $B(q)$ and is defined by the integral $$B(q)\equiv \int_{-\pi/2}^{\pi/2} \frac{\sin\left(\frac{q}{2}\tan\theta\right)}{\sin\theta}d\theta\ .$$ I only care about real $q$'s, but that is probably not important for my question. Using a simple change of variables $w=\frac{q}{2}\tan\theta$ this can also be written as $$B(q)=\int_{-\infty}^{\infty} \frac{\sin\left(w\right)}{w}\frac{1}{\sqrt{1+4 w^2/q^2}}dw $$ (if you're interested, this came up as one of the components of the response function of an elastic half-space).
I am interested in the asymptotics of $B(q)$. For large $q$ it is easy to show that $B(q)$ approaches $\pi$. My problem is with the small $q$ limit, $q\to0$. Numerically I have found that the leading order seems to behave as $B(q)=(\pi \gamma-\log(q))q+\mathcal{O}(q^2)$, where $\gamma$ is the Euler-Mascharoni constant. You can see in these plots that this is a very good guess (blue line is the approximation, red points are calculated numerically):
What I need is a way to prove that this is indeed the asymptotic behavior of $B$. Any suggestions (or references to relevant techniques) will be much appreciated.
(1/4)*q*MeijerG([[1/2], []], [[0, 0], [-1/2]], (1/16)*q^2)'
which is not of much help, except that Maple can evaluate it quickly. Maple matched the graphs you show. $\endgroup$