If the Earth were a smooth spheroid, how deep would the ocean be?
An approximation can be obtained quite simply by dividing the volume of water in the oceans by the surface area of an ellipsoid with a smooth surface representing the idealized Earth in your question.

The volume of Earth's oceans, seas and bays is $1.332 \times 10^9 \text{ km}^3$.

The equatorial radius of Earth (semi-major axis of the spheroid) is $a = 6378.1 \text{ km}$. The polar radius of Earth (semi-minor axis) is $c = 6356.8 \text{ km}$.

The surface area of the oblate ($c &lt; a$) spheroid is:

$$S = 2 \pi a^2 \left( 1 + \frac{1 - e^2}{e}\tanh^{-1} e \right)$$

where $e^2 = 1 - \frac{c^2}{a^2}$.

Which gives us $\approx 0.51 \times 10^9 \text{ km}^2$.

Dividing the volume of the oceans by this results gives us $\approx 2.6 \text{ km}$.

Note: Earth is not a sphere. An ellipsoid is a better representation of our Earth. Nevertheless, the answer to your question would have been approximately the same had I used a sphere instead, as suggested in the title of your question.