$ gl(2,\mathbb C) \cong sl(2,\mathbb C) \oplus \mathbb C $
The $4$-dimensional Lie algebra $\mathfrak{gl}_2(\mathbb{C})$ has a basis $e_1=E_{12}$, $e_2=E_{21}$, $e_3=E_{11}-E_{22}$ amd $e_4=E_{11}+E_{22}=I_2$, where $E_{ij}$ denotes the matrix with entry $1$ at position $(i,j)$ and zero entry otherwise. The Lie bracket is given by matrix commutator. Obviously we have $[e_1,e_2]=e_3$, $[e_1,e_3]=-2e_1$ and $[e_2,e_3]=2e_2$. Hence $\langle e_1,e_2,e_3\rangle$ is an ideal isomorphic to $\mathfrak{sl}_2(\mathbb{C})$. The center $Z$ of $\mathfrak{gl}_2(\mathbb{C})$, and ideal also, is clearly given by $\langle e_4\rangle$. Since $(e_1,e_2,e_3,e_4)$ is a basis, and $e_4$ has trivial bracket with $e_1,e_2,e_3$ it follows that $$ \mathfrak{gl}_2(\mathbb{C})\cong \mathfrak{sl}_2(\mathbb{C})\oplus Z \cong \mathfrak{sl}_2(\mathbb{C})\oplus \mathbb{C}. $$
One way to do this is to write down an exact sequence $$0\longrightarrow\mathfrak{sl}_2\longrightarrow\mathfrak{gl}_2\longrightarrow\mathbb{C}\longrightarrow 0$$ where the first map is the obvious embedding and the second is the trace map (of course you need to check that both are Lie algebra homomorphisms, but that is more-or-less obvious). The map $\mathbb{C}\to\mathfrak{gl}_2$ given by $a\mapsto \frac{a}{2}I_2$ gives you a splitting.