Let $\mathbf{E}$ be a vector field with components $E_j = \mathbf{e}_j \cdot \mathbf{E}$ in a cartesian coordinate system. Show that $$\mathbf{E}(\nabla \cdot \mathbf{E})-\mathbf{E}\times(\nabla \times \mathbf{E}) = \partial_i S_{ij} \mathbf{e}_j$$ where $S_{ij} = c_1E_iE_j + c_2 \delta_{ij} \mathbf{E} \cdot \mathbf{E}$ with constants $c_1, c_2$ to be determined.
Attempted solution
Note that $$[\mathbf{E}(\nabla \cdot \mathbf{E})-\mathbf{E}\times(\nabla \times \mathbf{E})]_i = E_i (\partial _j E_j) - \epsilon_{ijk}E_j \epsilon_{klm} \partial_l E_m = E_i\partial_j E_j- [\delta_{il}\delta_{jm}-\delta_{im}\delta_{jl}]E_j\partial_lE_m = E_i\partial_jE_j-E_m\partial_iE_m+E_j\partial_jE_i = \partial_j(E_iE_j)-E_j\partial_jE_i-\dfrac{1}{2}\partial_i(E_mE_m)+E_j\partial_jE_i = \partial_j(E_iE_j)-\dfrac{1}{2}\partial_i(E_mE_m) = \partial_j(E_iE_j-\dfrac{1}{2}\delta_{ij}E_mE_m)$$
So it should seem like $c_1=1$ and $c_2 = -1/2$. But what tells me it should be $\partial_j(E_iE_j-\dfrac{1}{2}\delta_{ij}E_mE_m) $ rather than $\partial_i(\delta_{ij}E_iE_j - \dfrac{1}{2}E_mE_m)$? Is it because of the thrice repeated index in the first term?
Your first conclusion is correct, indeed note that
$$ [{\bf E}(\nabla \cdot {\bf E}) - {\bf E}\times(\nabla \times {\bf E})]_i = \partial_k\left(E_kE_i - \delta_{ik}{\bf E}\cdot {\bf E}\right) $$
or equivalently
$$ [{\bf E}(\nabla \cdot {\bf E}) - {\bf E}\times(\nabla \times {\bf E})]_j = \partial_i\left(E_iE_j - \delta_{ij}{\bf E}\cdot {\bf E}\right) $$
so that
$$ {\bf E}(\nabla \cdot {\bf E}) - {\bf E}\times(\nabla \times {\bf E}) = \partial_i\left(E_iE_j - \delta_{ij}{\bf E}\cdot {\bf E}\right) {\bf e}_j = \partial_iS_{ij}{\bf e}_j $$
with
$$ S_{ij} = E_{i}E_{j} - \frac{1}{2}\delta_{ij}{\bf E}\cdot {\bf E} $$
The second expression is however not valid, it should read $\partial_\color{red}{k} (\delta_{i\color{\red}{k}}E_iE_j - 1/2{\bf E}\cdot{\bf E})$