Get a .38 revolver with a two inch barrel. Stay away from automatics. Sure, they can do great things. But, that's only if you are proficient. They can get you in a load of trouble in a panic situation.
Keep it loaded with hollow points and keep it loaded always. Unless you can use it NOW, it's useless. There are small key-less safes that are perfect for the bedroom.
Get training and get practice. The gun has to become an extension of yourself if you can ever hope to use it in a crisis situation. Best of luck.
BTW, Can you also get a restraining order against that garbage just so you don't have to hear his threats?