You need to take firearms training before you possess a gun, and you could use some law education as well. From your ridiculous statements here, it seems more likely that you'll get into trouble with a firearm than be able to defend yourself.
If you shoot a person, a grand jury is going to determine if it was justified, based on whether you had a reasonable fear of imminent peril of death or great bodily injury. That's a jury of your peers; the folks who live around you and couldn't get out of jury duty. It's not going to be Alex Jones and Fox News commentators deciding your fate. It's going to be Californians.
Or, you could miss and have the bad guy disarm you and use that gun against you.
Or, you could brandish your gun at, or shoot someone who isn't a threat at all, because you're worried they might be out to neutralize you.
Gun ownership is a right, but not necessarily a good idea for everyone. You should put some thought into that, about whether owning a gun is more likely to get you personally out of trouble, or into it.
Here are some dogs that are available near you:
Petfinder. Having a new buddy to exercise may help you feel safer and give you something to help pass the time.