It is hard to overstate how bad this advice is, and how demonstrative it is of the broken policing system we have in the U.S.
Gun owners are substantially more likely to die of gun violence than non-gun owners. Gun owners have a 3x higher risk of suicide. In the event that someone does break in, gun owners are more likely to die than non-gun owners.
All of this is publicly available information, and the cop's advice to someone facing substantial psychological stress was to "get a gun."
We are so, so far away from a sane, functioning public safety system in this country it can be depressing.