You can sometimes pick these things up cheap on Kijiji. I got an aluminum late 2008 MacBook5,1 like yours with 2 GB RAM and 160 GB HD locally for under US$150. The trackpad didn't click 100% consistently, but 10 minutes of trial and error adjustments fixed that, as there is an adjustment screw in them specifically for this purpose. (I already had an SSD so I wasn't worried about the HD, and I had 4 GB RAM left over from my MacBook Pro upgrade, although I just ordered 8 GB Transcend RAM for around US$36 from a killer Amazon.ca sale.) Also you can sometimes pick up its successor, the polycarbonate MacBook6,1 for cheap on Kijiji. Furthermore, there is a guy in the US who sells refurb MacBook6,1 units on eBay for US$180.
MacBook 6,1 is basically the same internals as your MacBook5,1, but with a plastic shell. More importantly, it officially supports High Sierra whereas yours doesn't (unless you patch it). Since the internals are so similar, your SSD and your 8 GB RAM will work in MacBook 6,1. The only issue would be your wasted battery, but at least it would come with a working battery.
You can get "For Parts Only" MacBook5,1 units for even cheaper to attempt a motherboard swap, but there's no guarantee it would actually have a fully functional motherboard. Plus it would be a major PITA.
---
BTW, with my MacBook5,1 Kijiji purchase, I re-discovered that 2 GB RAM with 160 GB HD is completely unusable, even with and old OS like Yosemite 10.10.
