Hey ANM, It sounds like you are feeling pretty bad. I'm so sorry. Do you really want to change fields, or is more that you feel you have to? How close are you to FI/ early retirement?

It's definitely possible to change. Heck, 50 sounds young to me these days, and you're not close to that.

Libraries don't pay a lot, but a librarian with a background in database development could pick and choose her job. You usually need an MLS, which many people nowadays get online.
I love Library work. You're neither sitting or standing all day, which is something I would look for in a job. There is really no age discrimination in libraries, not that I've seen in my 35 years in the field. Colleges pay MUCH better than public libraries; both generally offer great pension plans (you're still in CA, yes?)

Teaching is another field that would be fairly easy to break into. You need to get certified, but to start as a substitute all you need is a BA/BS.

I bet you could get some good ideas browsing around MMM.

I hope things are looking up for you.