J frame or Taurus 85 would be what I would look for in that range, knowing what I know now. That is if you are looking for something concealable, though you did specify either 9mm or .45. I do consider .38 Special a self defense caliber, though.
Maybe spring the extra $10 or so for a Kahr CW9. Or look for a used one.
Have, and do, sometimes slip a J frame in my pocket for that particular reason. When I am too lazy or hurried to strap on the G19.
House-type handgun in that range, used Ruger P series for semi, used Model 10 or 64 for revolver would be hard to go wrong. Again, assuming .38 fits your definition of self defense caliber.
Will admit, knowing what I know now ain't everything to know. My opinions might change with more knowledge.
On hearsay, my much loved and respected Pops has a High Point 9mm he has spoken highly of when it has come up.
As an unusual choice for home defense, you could always pick up a replica 1860 Army. Cap and ball black powder driven .44 lead ball. If'n you had to use it, the police might be a smidgen perplexed. You might have to be a bit eccentric to pull this off, though.