After thinking about this question, I am wondering: is it true that any symmetric $n\times n$ matrix $A$ can be written as:
$$\mathbf{A}=\sum_{i=1}^n \lambda_i \mathbf{B}_i$$ where $\mathbf{B}_i=\mathbf{e}_i\mathbf{e}_i^{\text{T}}$ and $\{\mathbf{e}_1,\dots ,\mathbf{e}_n\}$ an orthonormal basis of $\mathbb{R}^n?$
Yes, it is true [provided you meant: real symmetric] and is just a rephrasing of the diagonalization theorem for such matrices.
Since $A$ is symmetric, it is diagonalizable with real spectrum $\{\lambda_i\}$ in an orthonormal basis $\{e_i\}$. This means that, as an operator, $A$ acts on $\mathbb{R}^n$ as follows: $$ Ax=\sum_{i=1}^n \lambda_i \langle e_i,x\rangle e_i $$
Now the matrix of each operator $x\longmapsto \langle e_i,x\rangle e_i$ is precisely $e_ie_i^T$.