Suppose that $f : \mathbb{R} \rightarrow \mathbb{R}$ satisfies $f(x+y) = f(x) + f(y)$ for each $x, y \in \mathbb{R}$.
$1)$ I've proven that $f(qx)=qf(x)$ for all $x \in \mathbb{R}$ and $n \in \mathbb{Q}$
$2)$ I've proven that $f$ is continuous at $0$ if and only if $f$ is continuous on $\mathbb{R}$
$3)$ Question: We want to prove that if $f$ is continuous at $0$, then there is an $m \in \mathbb{R}$ such that $f(x)=mx$ for all $x \in \mathbb{R}$
I was able to show that if $x \in \mathbb{Q}$, then $m=f(1)$ using what I've proven earlier: $f(x)=f(1\cdot x)=xf(1)$
But $x \in \mathbb{R}$ so this proof is incomplete. My intuition says my $m$ is correct, but I haven't used continuity yet; played around with the fact that continuous at $0$ implies continuity over all real numbers (using what I proved in $2$). I feel as though the proof should go through that road and not my first line of reasoning. I'm unsure how to bridge this gap.
Hint: Consider the function $g(x)=f(x)-mx$, which is continuous by hypothesis. We know that $g|_{\mathbb{Q}}=0$ and that $\mathbb{Q}$ is dense in $\mathbb{R}$. What can we say about $g$ then?