It's been a long time since I did anything like this, but I'll give it a try. I'm confident in the basic approach of the proof, but I feel like there might be something missing between the first and second step...

Let be a limit point of gr(f).

because f(x) is continuous.

gr(f) is a closed subset of