Separation of variables and complex numbers 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?
 A: Let's have a look at the radial equation that resulted from the separation of variables.  That equation is
$$\frac{d}{dr}\left(r^2\frac{dR(r)}{dr}\right)-\lambda R(r)=0 \tag 1$$
Now, using the Frobenius Method we write a series solution for $R(r)$ of the form 
$$R(r)=\sum_{n=0}^{\infty}a_nr^{n+\alpha} \tag 2$$
Using $(2)$ in $(1)$ reveals that $\lambda =\alpha(\alpha+1)$ and $a_n=0$ for all $n\ne 0$.
Therefore, the differential equation for $\Theta$ becomes
$$\frac{d}{d x} \left[ (1 - x^2) \frac{d}{d x} \bar\Theta(x) \right] + \left[ \alpha (\alpha + 1) - \frac{m^2}{1 - x^2} \right] \bar\Theta(x) = 0 \tag 3$$
where $x=\cos \theta$ and $\Theta(\theta)=\bar\Theta(\cos \theta)$.  It can be shown that solution to $(3)$ is given by 
$$\bar\Theta(x) = \frac{1}{\Gamma(1-m)} \left[\frac{1+x}{1-x}\right]^{m/2} \,_2F_1 (-\alpha, \alpha+1; 1-m; \frac{1-x}{2}) \tag 4$$
where $\Gamma$ is the Gamma Function and $_2F_1$ is the Hypergeometric Function.  
The expression is $(4)$ can be shown to have a singularity at $x=-1$ unless $\alpha$ is an integer, say $\ell$ and $m$ is restricted by $-\ell \le m\le \ell$.  In that case, solutions to $(4)$ are polynomials called the Associated Legendre Polynomials.
A: \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. 
