I began with the Laplace's equation in the context of spherical harmonics.
From wikipedia, one reads.

So far I have followed, but in the sequel is stated that
$m \in \Bbb{R}$ since $\Phi$ is periodic. Then assume $Y(\theta,\varphi)$ is regular at the poles of the sphere ($\theta = 0,\pi$) this implies that $\lambda = l (l+1)$ for some integer $l \geq |m|$.
Why is this so?
I tried to work with $$\lim_{\theta \to 0}\lambda \sin^2 \theta + \frac{\sin \theta}{\Theta} \frac{d}{d\theta}\bigg(\sin\theta \frac{d\Theta}{d\theta}\bigg) = m^2 $$
But could only arrive at
$$\lim_{\theta \to 0}\lambda \sin^2 \theta \bigg(\lambda + \frac{\Theta''}{\Theta} \bigg)+ \sin \theta \cos \theta\frac{\Theta'}{\Theta} = m^2 $$
What is the way to go?
\begin{align} \lambda \, \sin^{2}\theta + \frac{\sin\theta}{F} \frac{d}{d\theta}\left(\sin\theta \, \frac{dF}{d\theta}\right) = m^{2} \end{align} leads to \begin{align} \frac{1}{\sin\theta} \, \frac{d}{d\theta}\left(\sin\theta \, \frac{dF}{d\theta}\right) + \left[ \lambda - \frac{m^{2}}{\sin^{2}\theta} \right] \, F = 0 \end{align} or \begin{align} F'' + \frac{\cos\theta}{\sin\theta} \, F' + \left[ \lambda - \frac{m^{2}}{\sin^{2}\theta} \right] \, F = 0. \end{align} Since $\lambda$ is an arbitrary separation constant let $\lambda = l(l+1)$. This leads to the form of the associated Legendre differential equation and has solution \begin{align} F(\theta) = A \, P_{l}^{m}(\cos\theta) + B \, Q_{l}^{m}(\cos\theta). \end{align} Since $\theta \to 0$ is a required component of the problem then $B=0$ to keep the solution bounded.