How prove this limit $\lim_{\alpha\to n}\frac{J_{\alpha}(x)\cos{(\alpha \pi)}-J_{-\alpha}(x)}{\sin{\alpha\pi}}$?
Let $J_{\nu}(z)$ the Bessel function of first kind defined as $$ J_\nu(z) = \sum_{m=0}^\infty \frac{(-1)^m}{m! \, \Gamma(m+\nu+1)} {\left(\frac{z}{2}\right)}^{2m+\nu} \tag 1 $$ and $Y_{\nu}(z)$ the Bessel function of second kind (or Weber function or Neumann function) defined as $$ Y_{\nu}(z)=\frac{J_{\nu}(z)\cos(\nu\pi)-J_{-\nu}(z)}{\sin(\nu\pi)} \tag 2 $$ or the limit for integral $\nu$, $\nu=n$. For integral $\nu$, using the l'Hopital's rule we have $$\begin{align} Y_{n}(z) &=\lim_{\nu\to n}\frac{J_{\nu}(z)\cos(\nu\pi)-J_{-\nu}(z)}{\sin(\nu\pi)}\\ &=\lim_{\nu\to n}\frac{\frac{\partial}{\partial \nu}\left(J_{\nu}(z)\cos(\nu\pi)-J_{-\nu}(z)\right)}{\frac{\partial}{\partial \nu}\sin(\nu\pi)}\\ &=\lim_{\nu\to n}\frac{\frac{\partial J_{\nu}(z)}{\partial \nu}\cos(\nu\pi)-\pi J_{\nu}(z)\sin(\nu\pi)-\frac{\partial J_{-\nu}(z)}{\partial \nu}}{\pi\cos(\nu\pi)}\\ &=\frac{1}{\pi}\left[\left.\frac{\partial J_{\nu}(z)}{\partial \nu}\right|_{\nu=n}-(-1)^n\left.\frac{\partial J_{-\nu}(z)}{\partial \nu}\right|_{\nu=n}\right]\tag 3 \end{align} $$ where we used $\cos(n\pi)=(-1)^n$ and $\sin(n\pi)=0$. We shall now obtain Hankel's expansion of function $Y_n(z)$, where $n$ is any positive integer. It is clear that $$ \begin{align} \frac{\partial J_{\nu}(z)}{\partial \nu} &= \sum_{m=0}^\infty \frac{(-1)^m}{m!}\frac{\partial }{\partial \nu}\left\{\frac{1}{\Gamma(m+\nu+1)} {\left(\frac{z}{2}\right)}^{2m+\nu} \right\}\\ &= \sum_{m=0}^\infty \frac{(-1)^m}{m! \, \Gamma(m+\nu+1)} {\left(\frac{z}{2}\right)}^{2m+\nu} \left\{\log\left(\tfrac{z}{2}\right)-\psi(\nu+m+1)\right\}\tag 4 \end{align} $$ observing that $$ \frac{\partial }{\partial \nu} {\left(\frac{z}{2}\right)}^{2m+\nu}={\left(\frac{z}{2}\right)}^{2m+\nu}\log\left(\tfrac{z}{2}\right) $$ and $$ \frac{\partial }{\partial \nu}\frac{1}{\Gamma(m+\nu+1)}=-\frac{\frac{\partial }{\partial \nu}\Gamma(m+\nu+1)}{[\Gamma(m+\nu+1)]^2}=-\frac{\psi(m+\nu+1)}{\Gamma(m+\nu+1)} $$ and $\psi(z)=\frac{\operatorname{d}\log \Gamma(z)}{\operatorname{d}z}=\frac{\Gamma'(z)}{\Gamma(z)}$ is the digamma function.
For $\nu\to n$ the (4) becomes $$ \begin{align} \left.\frac{\partial J_{\nu}(z)}{\partial \nu}\right|_{\nu=n} &= \sum_{m=0}^\infty \frac{(-1)^m}{m! \, (m+n)!} {\left(\frac{z}{2}\right)}^{2m+n} \left\{\log\left(\frac{z}{2}\right)-\psi(n+m+1)\right\}. \tag 5 \end{align} $$
The evaluation of $\left.\frac{\partial J_{-\nu}(z)}{\partial \nu}\right|_{\nu=n}$ is a little more tedious because of the pole of $\psi(-\nu+m+1)$ at $\nu=n$ in the terms of which $m=0,1, \ldots,n-1$. We brack the series for $J_{-\nu}(z)$ into two parts, thus $$ J_{-\nu}(z) = \sum_{m=0}^{n-1} \frac{(-1)^m}{m! \, \Gamma(m-\nu+1)} {\left(\frac{z}{2}\right)}^{2m-\nu}+\sum_{m=n}^{\infty} \frac{(-1)^m}{m! \, \Gamma(m-\nu+1)} {\left(\frac{z}{2}\right)}^{2m-\nu} $$ and in the former part we replace $$ \frac{1}{\Gamma(m-\nu+1)}=\frac{\Gamma(\nu-m)\sin((\nu-m)\pi)}{\pi} $$ using the reflection formula for the Gamma function $\Gamma(z)\Gamma(1-z)=\frac{\pi}{\sin(\pi z)}$.
Now, when $0\le m\le n$, $$ \begin{align} & \left.\frac{\partial }{\partial \nu} \left\{\frac{\Gamma(\nu-m)\sin((\nu-m)\pi)}{\pi}{\left(\frac{z}{2}\right)}^{2m-\nu}\right\} \right|_{\nu=n}\\ &\quad= {\left(\tfrac{z}{2}\right)}^{2m-\nu}\Gamma(\nu-m)\frac{1}{\pi}\times\\ &\qquad\times\left. \left\{ \psi(\nu-m)\sin((\nu-m)\pi)+ \pi\cos((\nu-m)\pi)-\log\left(\tfrac{z}{2}\right)\sin((\nu-m)\pi) \right\}\right|_{\nu=n}\\ &\quad= {\left(\tfrac{z}{2}\right)}^{2m-n}\Gamma(n-m)\cos((n-m)\pi). \end{align} $$ Hence $$ \begin{align} \left.\frac{\partial J_{-\nu}(z)}{\partial \nu}\right|_{\nu=n} &= \sum_{m=0}^{n-1} \frac{(-1)^n\, \Gamma(m-n)}{m!} {\left(\frac{z}{2}\right)}^{2m-n}+\\ &\quad+\sum_{m=n}^{\infty} \frac{(-1)^m}{m!(m-n)!} {\left(\frac{z}{2}\right)}^{2m-n}\left\{-\log\left(\frac{z}{2}\right)+\psi(-n+m+1)\right\} \end{align} $$ that is $$ \begin{align} \left.\frac{\partial J_{-\nu}(z)}{\partial \nu}\right|_{\nu=n} &= (-1)^n\, \sum_{m=0}^{n-1} \frac{(n-m-1)!}{m!} {\left(\frac{z}{2}\right)}^{2m-n}+\\ &\quad+(-1)^{n-1}\sum_{m=0}^{\infty} \frac{(-1)^m}{m!(m+n)!} {\left(\frac{z}{2}\right)}^{2m+n}\left\{\log\left(\frac{z}{2}\right)-\psi(m+1)\right\} \end{align}\tag 6 $$ when we replace $m$ by $n+m$ in the second series.
Combining (5) and (6), the (3) becomes $$ \begin{align} \pi Y_n(z) &= -\sum_{m=0}^{n-1} \frac{(n-m-1)!}{m!} {\left(\frac{z}{2}\right)}^{2m-n}+\\ &\quad+\sum_{m=0}^{\infty} \frac{(-1)^m}{m!(m+n)!} {\left(\frac{z}{2}\right)}^{2m+n}\left\{2\log\left(\frac{z}{2}\right)-\psi(m+1)-\psi(n+m+1)\right\}\\ &= 2\left[\gamma+ \log\left(\tfrac{z}{2}\right)\right]J_n(z) -\sum_{m=0}^{n-1} \frac{(n-m-1)!}{m!} {\left(\frac{z}{2}\right)}^{2m-n}+\\ &\quad-\sum_{m=0}^{\infty} \frac{(-1)^m}{m!(m+n)!} {\left(\frac{z}{2}\right)}^{2m+n}\left\{\sum_{k=1}^{m}\frac{1}{k}+ \sum_{k=1}^{n+m}\frac{1}{k} \right\}\\ \end{align} $$ using the relation $\psi(n+1)=\sum_{k=1}^n\frac{1}{k}-\gamma$ where $\gamma$ is the Euler’s Constant.
Thus we have $$ Y_n(z)=\frac{2}{\pi}\left[\gamma+ \log\left(\tfrac{z}{2}\right)\right]J_n(z) -\frac{1}{\pi}\sum_{m=0}^{n-1} \frac{(n-m-1)!}{m!} {\left(\frac{z}{2}\right)}^{2m-n}+\\ \qquad\qquad\quad-\frac{1}{\pi}\sum_{m=0}^{\infty} \frac{(-1)^m}{m!(m+n)!} {\left(\frac{z}{2}\right)}^{2m+n}\left\{\sum_{k=0}^{m-1}\frac{1}{k+1}+ \sum_{k=0}^{n+m-1}\frac{1}{k+1} \right\}\tag 7 $$ known also as Hankel's formula.