Let $f\in C(\mathbb{R})$ be a function that satisfies $\displaystyle\lim_{x\to\pm\infty}f(x)=+\infty$. Show that $f$ attains its absolute minimum, i.e. there is a point $x_0\in\mathbb{R}$ such that $f(x)\geq f(x_0)$ for all $x\in\mathbb{R}$.
I was thinking about studying the set $M=\{L\in\mathbb{R}: f(x)\geq L, \forall x\in\mathbb{R}\}$. But I'm not sure if this is the right way to proceed.