The answer given above has already mentioned the necessary ingredients for you to find the relation you are after. Here I will reiterate with allegedly simpler manner:
Coming from <PERSON>'s QFT Lecture Notes, page-130.
Define the polarization vectors $\vec{\epsilon}_1(\vec{p}), \vec{\epsilon}_2(\vec{p}) $ as $$ \vec{\epsilon}_r(\vec{p}) := \epsilon^i_r(\vec{p}) \ ; $$ $$ r=1,2. \ , \ i=1,2,3. $$
with the properties:
$$ \vec{\epsilon}r(\vec{p}) \cdot \vec{p} = \epsilon^i_r(\vec{p}) p^i =0 $$ $$ \vec{\epsilon}_r(\vec{p}) \cdot \vec{\epsilon}_s(\vec{p}) = \epsilon^i_r(\vec{p})\epsilon^i_s(\vec{p})=\delta{rs} $$
Above two is satisfied by polarization vectors by definition.
Using these we can show, that $$ \tag 1 \sum_r \epsilon^i_r(\vec{p})\epsilon^j_r(\vec{p}) = \delta^{ij} - \frac{p^ip^j}{|\vec{p}|^2} $$
This can be done by using the properties of the polarization vectors in a following way.
When we take a scalar product of the L.H.S. 804
with a polarization vector we expect to get $$ \epsilon^i_s(\vec{p})\sum_r \epsilon^i_r(\vec{p})\epsilon^j_r(\vec{p}) = \sum_r \delta_{rs}\epsilon^j_r(\vec{p})=\epsilon^j_s(\vec{p}) $$ To achieve this, we just need a delta function on the R.H.S. Hence the first entry $\delta^{ij}$ in our expression $(1)$.
Now let's take a scalar product of L.H.S. with a momentum vector, $$ p^i\sum_r \epsilon^i_r(\vec{p})\epsilon^j_r(\vec{p}) =0 $$ For the R.H.S. to produce the same result we must add an extra term to $\delta^{ij}$, which will cancel out the momentum vector. However this extra term should also be consistent with the previous case, when we multiplied both sides with a polarization vector.
Little thought will lead you to the expression $(1)$.
Here's a check: $$ \epsilon^i_s(\vec{p}) \left(\delta^{ij} - \frac{p^ip^j}{|\vec{p}|^2} \right)= \left(\epsilon^j_s(\vec{p})- \frac{\epsilon^i_s(\vec{p})p^ip^j}{|\vec{p}|^2} \right) =\epsilon^j_s(\vec{p}) $$ $$ p^i \left(\delta^{ij} - \frac{p^ip^j}{|\vec{p}|^2} \right)=\left(p^j - \frac{p^ip^ip^j}{|\vec{p}|^2} \right)= 0 $$ 374