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?