What is an algorithm for describing the partition of this equivalence relation?

Let $\mathbb{R}$ be the set of real numbers,$f : \mathbb{R} \to \mathbb{R}$ a map, and $E$ the equivalence relation on $ℝ$ defined by $E = \{(x,y) \in \mathbb{R} \times \mathbb{R} \mid f(x) = f(y) \}.$

Describe the partition of $\Bbb{R}$ in the following case:

$f(x) = 2x^2+4x+8$ for all $x \in \mathbb{R}$.

I worked out that every $x$ is in fact equivalent to $-x-2$ by observation, but I would like to know if there is some algorithmic way to find the partition.

Yes. Just solve the equation $f(x) = f(y)$:
$$2x^2 + 4x + 8 = 2y^2 + 4y + 8 \\ 2(x^2-y^2) + 4(x-y) = 0 \\ (x-y) \big( 2(x+y) + 4 \big) = 0 \\ x = y \vee x+y = -2$$
So $(x, y) \in E \iff x = y \text{ or } y = -x-2$.
The function is just $2(x+1)^2 + 6$. Clearly, $f(x)=f(y)$ iff $|x+1|=|y+1|$. In other words, the distance from $-1$ is the same for $x$ and $y$.