[proofplan]
We prove both implications directly from the definitions. If $f$ is lower semicontinuous, then any point strictly below the epigraph has a product neighbourhood still lying below the epigraph, so the complement of the epigraph is open. Conversely, if the epigraph is closed, then for a convergent sequence $x_k \to x_0$ we compare $f(x_0)$ with $L := \liminf_{k \to \infty} f(x_k)$ by placing suitable heights above the graph and passing to limits in the closed epigraph. The exceptional case $L=-\infty$ is ruled out by the fact that $f$ never takes the value $-\infty$.
[/proofplan]
[step:Show that lower semicontinuity makes the complement of the epigraph open]
Assume $f$ is lower semicontinuous on $\mathbb{R}^n$. We prove that $\mathbb{R}^{n+1} \setminus \operatorname{epi} f$ is open.
Let $(x_0,r_0) \in \mathbb{R}^{n+1} \setminus \operatorname{epi} f$. Then $r_0 < f(x_0)$. Choose a real number $a \in \mathbb{R}$ such that
\begin{align*}
r_0 < a < f(x_0).
\end{align*}
If $f(x_0)=+\infty$, take for instance $a=r_0+1$.
By lower semicontinuity at $x_0$, the strict sublevel complement
\begin{align*}
\{x \in \mathbb{R}^n : f(x) > a\}
\end{align*}
is a neighbourhood of $x_0$. Hence there exists $\delta_1>0$ such that $|x-x_0|<\delta_1$ implies $f(x)>a$. Define $\delta_2 := a-r_0>0$ and $\delta := \min\{\delta_1,\delta_2\}>0$.
If $(x,r) \in \mathbb{R}^{n+1}$ satisfies $|x-x_0|<\delta$ and $|r-r_0|<\delta$, then
\begin{align*}
r < r_0+\delta \le r_0+\delta_2 = a < f(x).
\end{align*}
Thus $(x,r) \notin \operatorname{epi} f$. Therefore a Euclidean neighbourhood of $(x_0,r_0)$ is contained in $\mathbb{R}^{n+1}\setminus \operatorname{epi} f$, so the complement is open. Hence $\operatorname{epi} f$ is closed.
[guided]
Assume $f$ is lower semicontinuous on $\mathbb{R}^n$. To prove that $\operatorname{epi} f$ is closed, it is enough to prove that its complement is open.
Take a point $(x_0,r_0) \notin \operatorname{epi} f$. By the definition of the epigraph, this means
\begin{align*}
r_0 < f(x_0).
\end{align*}
We need to build a full neighbourhood of $(x_0,r_0)$ that remains outside the epigraph. The gap between $r_0$ and $f(x_0)$ is what gives room to do this. Choose $a \in \mathbb{R}$ with
\begin{align*}
r_0 < a < f(x_0).
\end{align*}
If $f(x_0)=+\infty$, the choice $a=r_0+1$ works.
Lower semicontinuity at $x_0$ says that strict lower bounds persist locally: since $a<f(x_0)$, there exists $\delta_1>0$ such that
\begin{align*}
|x-x_0|<\delta_1 \implies f(x)>a.
\end{align*}
Now define $\delta_2 := a-r_0>0$ and $\delta := \min\{\delta_1,\delta_2\}$. If $(x,r)$ satisfies $|x-x_0|<\delta$ and $|r-r_0|<\delta$, then the vertical coordinate satisfies
\begin{align*}
r < r_0+\delta \le r_0+\delta_2 = a.
\end{align*}
At the same time, the horizontal coordinate satisfies $|x-x_0|<\delta \le \delta_1$, so $f(x)>a$. Combining these inequalities gives
\begin{align*}
r < a < f(x).
\end{align*}
Thus $f(x)\le r$ is false, so $(x,r)\notin \operatorname{epi} f$. We have found a neighbourhood of $(x_0,r_0)$ contained in the complement of the epigraph. Therefore the complement is open, and $\operatorname{epi} f$ is closed.
[/guided]
[/step]
[step:Use closedness of the epigraph to prove the lower semicontinuity inequality]
Assume $\operatorname{epi} f$ is closed in $\mathbb{R}^{n+1}$. Let $(x_k)_{k=1}^{\infty}: \mathbb{N}\to\mathbb{R}^n$ be a sequence such that $x_k \to x_0$ in $\mathbb{R}^n$. Define
\begin{align*}
L := \liminf_{k \to \infty} f(x_k) \in [-\infty,+\infty].
\end{align*}
We prove
\begin{align*}
f(x_0) \le L.
\end{align*}
If $L=+\infty$, then $f(x_0)\le+\infty=L$, so the desired inequality holds.
Suppose next that $L\in\mathbb{R}$. Fix $\varepsilon>0$. By the definition of the limit inferior, there is a subsequence $(x_{k_j})_{j=1}^{\infty}$ such that
\begin{align*}
f(x_{k_j}) \to L.
\end{align*}
After discarding finitely many terms, we may assume $f(x_{k_j})\le L+\varepsilon$ for every $j$. For each $j$, define $r_j := L+\varepsilon$. Then $(x_{k_j},r_j)\in\operatorname{epi} f$ for every $j$, and
\begin{align*}
(x_{k_j},r_j) \to (x_0,L+\varepsilon)
\end{align*}
in $\mathbb{R}^{n+1}$. Since $\operatorname{epi} f$ is closed, $(x_0,L+\varepsilon)\in\operatorname{epi} f$. Hence
\begin{align*}
f(x_0)\le L+\varepsilon.
\end{align*}
Because $\varepsilon>0$ was arbitrary, we obtain $f(x_0)\le L$.
It remains to rule out $L=-\infty$. If $L=-\infty$, then for every $a\in\mathbb{R}$ and every $m\in\mathbb{N}$ there exists $k\ge m$ such that $f(x_k)\le a$. Thus we may choose a subsequence $(x_{k_j})_{j=1}^{\infty}$ with $f(x_{k_j})\le a$ for every $j$. Then $(x_{k_j},a)\in\operatorname{epi} f$ for every $j$, and
\begin{align*}
(x_{k_j},a) \to (x_0,a)
\end{align*}
in $\mathbb{R}^{n+1}$. Closedness gives $(x_0,a)\in\operatorname{epi} f$, so $f(x_0)\le a$. Since $a\in\mathbb{R}$ was arbitrary, this implies $f(x_0)\le a$ for all real $a$, which is impossible because $f(x_0)\in(-\infty,+\infty]$. Therefore $L=-\infty$ cannot occur.
Thus for every sequence $x_k\to x_0$,
\begin{align*}
f(x_0)\le \liminf_{k\to\infty} f(x_k).
\end{align*}
This is precisely lower semicontinuity of $f$ at $x_0$. Since $x_0\in\mathbb{R}^n$ was arbitrary, $f$ is lower semicontinuous on $\mathbb{R}^n$.
[/step]