I can parametrize any $U(2)$ matrix as:
$$ M = e^{i\varphi/2}\left(\begin{matrix} e^{i\phi_1}cos\theta & e^{i\phi_2}sin\theta \\ -e^{-i\phi_2}sin\theta & e^{-i\phi_1}cos\theta \end{matrix}\right) $$
To obtain the Lie algebra I derive respecto to the four parameters and evalute at the identity element, but for $\phi_2$ the generator that I get is a null matrix.
Note: I know that I have to obtain the Pauli matrices plus the identity (up to multiplicative factors)... so what's wrong here?
$\newcommand{e}{\mathrm{e}}$ $\newcommand{i}{\mathrm{i}}$ There's no mystery here—your calculation shows that the map $M:\mathrm{U}(1)^4\to\mathrm{U}(2)$ defined by $$M(\phi/2,\theta,\phi_1/2,\phi_2/2)=\e^{\i\varphi/2}\e^{\i\sigma_3(\phi_1+\phi_2)/2}\e^{\i\sigma_2\theta}\e^{\i\sigma_3(\phi_1-\phi_2)/2}\text{,}$$ while surjective, does not have full rank at the identity. No such map can have full rank everywhere—engineers call this loss of rotational degrees of freedom gimbal lock.
To obtain a basis for the Lie algebra, you need to choose a map $M$ that has full rank at the identity, such as
$$M(\phi_0,\phi_x,\phi_y,\phi_z)=\e^{\i\phi_0}\e^{\i\phi_1\sigma_1}\e^{\i\phi_2\sigma_2}\e^{\i\phi_3\sigma_3}$$