Constructing a breadth-first tree is the correct way to go. This gives you the running time of $\Theta(n+m)$ where $n$ is the number of vertices and $m$ the number of edges respectively.
One of the central facts needed is that a breadth-first tree $T$ rooted at vertex $r$, in an [undirected,] unweighted (equivalent to unit weight) graph $G$ is also a shortest path tree. That is, for every vertex $v$, the length of the shortest path between $r$ and $v$ in $G$ is equal to the length of the path from $r$ to $v$ is $T$.
So we pick (arbitrarily) a starting vertex $r$, and construct our tree $T$. What does this tell us about the diameter of $G$?
- The diameter is the length of the longest shortest path, so any shortest path provides a lower bound for the diameter.
- If $v$ is the furthest vertex from $r$ in $T$ (and hence in $G$), at distance $d(r,v)$ then $d(u,w) \leq 2\cdot d(r,v)$.
Thus the length of the longest shortest path is between $d(r,v)$ and $2\cdot d(r,v)$. That is, the diameter $D$ is at least $d(r,v)$, thus $2\cdot D \geq 2 \cdot d(r,v)$. Which gives our factor two approximation.
You can make it a little tighter (sort of) and take the two longest distances $D'$ and $D''$ from $r$ in $T$. Without loss of generality assume $D' \leq D''$. Then $D'' \leq D \leq D'+D'' \leq 2\cdot D''$. The worst case is that $D' = D''$, so we don't prove anything further though.