Standard long division is not really that bad. I got $$\int (x^3-2x^2+x+2-\frac{4x^3+6x^2+5x}{(x^2+x+1)^2})dx$$
Integrate each terms. You can integrate the first four terms to get $\frac{x^4}{4}-\frac{2x^3}{3}+\frac{x^2}{2}+2x$ use Ostrogradsky's method on the last term.
Ostrogradsky's method
$Q(x)=(x^2+x+1)^2$, $Q_1(x)=Q_2(x)=x^2+x+1$, $P(x)=4x^3+6x^2+5x$, you can deduce that $P_1(x)=-x$, $P_2(x)=4x+1$. (Try to work it out yourself.) Therefore, the last term becomes $-\frac{x}{x^2+x+1}+\int( \frac{4x+1}{x^2+x+1})\ dx$. Can you continue from here?
Hint after Ostrogradsky's method:
Split the integral into 2 parts: $\int(\frac{4x+2}{x^2+x+1}-\frac{1}{x^2+x+1})\ dx$. Use substitution on the remaining integrals.
My final solution after the substitution is:
$$\frac{x^4}{4}-\frac{2x^3}{3}+\frac{x^2}{2}+2x+\frac{x}{x^2+x+1}-2\ln(x^2+x+1)+\frac{2\sqrt{3} \arctan(\frac{2x\sqrt{3}+\sqrt{3}}{3})}{3}+C$$