Research typically shows an association between gun ownership and a moderately increased risk of homicide, but it doesn't prove that gun ownership reduces safety. Every study I've read about the risk factors of owning firearms has ended with the comment that more research is needed, particularly into how often firearms are used for protection. It's impossible to perform a cost/benefit analysis when there's almost no credible research into the benefits.
Research generally shows a modestly increased risk of homicide and a GREATLY increased risk of suicide. While it's true that there are tangential benefits outside of the alive/dead question, it's easily the most quantifiable.
And before people try to dispute including suicide with the 'if someone really wants to kill themselves they will find a way' argument, that is totally untrue. The majority of suicide attempts that fail are never repeated, and only about 10-15% of people who have failed in attempting suicide eventually die of it. The major difference in these often one-off events is whether or not you use a gun. If you do, you die about 90% of the time. If you don't, you die about 5%-10% of the time, depending on method.
When suicide is included, and it absolutely should be, the research strongly indicates that if your goal is to remain alive, owning a gun is not a good investment.
One of the interesting aspects of gun risk studies is that the decedents are typically not murdered with their own guns. This suggests that the heightened risk of homicide is either from living with someone else who owns a gun (e.g. an abusive spouse), from associating with other violent gun owners, or from some other uncontrolled confounding factor. These studies also group all gun owners together; it's possible that the risk of homicide differs significantly across subgroups of gun owners (e.g. hunters, recreational shooters, concealed carriers, gang members).
Sure, there are plenty of other possible confounds that can be hard to control for, some of which are more compelling than others. As I mentioned above though (and before in other threads), I find the homicide risk less important than the overwhelming suicide risk.
In any case, epidemiological studies don't prove causation, and population-wide statistics don't apply to specific individuals, so it's not really accurate to say that "if you own a gun you are more likely to die." It's easily possible that some unknown, uncontrolled confounder is responsible for both an increased risk of homicide and an affinity for gun ownership.
Studies linking smoking to cancer also don't prove causation, but we seem just fine with accepting them. The 'correlation <> causation' argument is not a convincing one, because no study proves causation. They simply provide evidence for or against it.
Also, of course population wide statistics don't apply to specific individuals, but since we're talking about people in general population wide statistics would be the only valid ones to use.