The show ending was always the book ending, it's the path to get there that was all messed up. I guarantee if he actually ever actually finishes it (not likely), the ending will be largely the same but it'll make more sense.
I think the ending was fine, the last episode actually felt like Martin's doing. The problem is the parade of garbage leading to it didn't make any sense so it made the ending feel like it was from a completely different story.