There's a script for that, which has the added advantage of giving you perfect connecting tangent lines.
It's called Metaball by the awesome Sato Hiroyuki - you can download it as part of a big bundle of mostly useful Illustrator scripts from his page here.
It turns a selection of circles into singular blobs by following tangent lines. Here's an example from that page - you can also input a value for the curve, and if you input 100, it gives perfectly straight lines like in your example.
Because it creates closed path shapes, you can select the paths it creates along with the circles, use
Unite (the first of the Pathfinder window options), and it just works perfectly.
If you're working with tangents, also check out Common Tangents and Tangents From A Point from the same script bundle. Here's two examples from that site: