In my answer here I gave a lemma that characterizes connectedness in terms of chains in (not necessarily open) covers.
We apply this to $U$, as we pick for each $x$ in $U$ a compact and connected neighborhood that is a subset of $U$, which can be done by first picking a compact neighborhood inside $U$ (using Hausdorffness and local compactness) and then a connected neighborhood inside that (using local connectedness) and we take the closure (still connected) of that.
Now for every $x$ and $y$ in $U$ we have a chain (as defined in that answer) connecting $x$ to $y$ and we take the union of the chain to get a compact and connected (due to the non-empty intersections) set containing $x$ and $y$.
This exercise is a typical application of the chain-characterization of connectedness.