Why the Ekeland variational principle needs lower semicontinuity? I study the Banach space version (see this for the principle) of the Ekeland variational principle.
It uses lower semicontinuity of $F$ to get its epigraph 
$ epiF=\{(x,t)\in X\times\mathbb{R}: F(x)\le t\}$ is closed and let the diameter of a constructed sequence of sets go to zero.
But I don't know why the closedness is necessary. Any help is appreciated.
 A: Consider this example: Define $f:\mathbb R \to \bar{\mathbb R}$ by
$$
F(x)=\begin{cases}\sqrt x& x>0\\
+\infty & x\le 0.\end{cases}
$$
Then $F$ is not lower semicontinuous (at zero). Now take the conditions from the variational principle:
$$
F(u)\le\epsilon, \ F(v)\le F(u), \ F(w)>F(v) - \epsilon|v-w|\ \forall w\ne v.
$$
Let $u$ with $F(u)\le\epsilon$ be given. Let $v>0$.
The third inequality above implies for $w\searrow0$, 
$$
F(v)=\sqrt v\le \epsilon|v|,
$$
which is equivalent to $\sqrt v\ge\epsilon^{-1}$. Together with $F(v)\le F(u)$ this implies $\sqrt u\ge \epsilon^{-1}$.
This implies: for $u$ with $\sqrt u <\epsilon^{-1}$ there is no such $v$ as predicted by the variational principle. Hence the principle fails for not lower semicontinuous functions.
A: I don't know what proof you're looking at, but one way to prove the Ekeland variational principle is to use an argument involving closed, nested sets, similar to lower level sets, whose diameter goes to $0$. Lower semi-continuity is required to make sure the sets are closed.
What is this proof? I actually don't know it! I only know a general thrust of the argument from a brief talk with my supervisor. Essentially, it involves interpreting all of the conditions of the point guaranteed to exist geometrically, and it should turn into an intersection of nested, closed "cones" that intersect with the closed epigraph.
Maybe if you showed the proof where use of lower-semicontinuity is not clear?
A: Since the accepted answer so far only provides a counterexample, I though that it would be important to add some light on why the condition is actually necessary.
In the proof of Ekeland's Variational Principle, as you mention, the closedness is used to invoke Cantor's Intersection Theorem,  which states that a nested sequence of closed sets in a complete metric space whose diameter goes to zero must have a nonempty, singleton intersection. The proof goes as follows: if $\{C_n\}$ is the nested sequence of closed sets and $diam(C_n) \to 0,$ we choose an arbitrary element $x_n \in C_n.$ The condition $$diam(C_n) \to 0$$ will then imply that $\{x_n\}$ is Cauchy, and hence convergent to some point $\bar{x}.$ Note that so far we haven't touched the closedness of the $C_n$'s. The problem now is that we can not guarantee that $\bar{x}\in C_n$ for those $C_n$ that are not closed. Therefore, Cantor's Intersection Theorem may fail without this assumption and hence Ekeland's Variational Principle may too. 
Hope this helps.   
