So, yeah. I hated how they dealt with Barney and his marriage, I hate how they dealt with the Mother, and I hate how Ted went back to Robin. And all three are related- Barney and Robin had to break up (and in a casual, who cares? way), so Ted could could pursue her. Same with the Mother dying.
I think it's important to view the finale as an epilogue. When you read a book, you invest tens of real-time hours with characters who experience a few days or weeks, and then your last few minutes of reading covers their next 20 years. That doesn't invalidate the prep work that's been done, it's just a quick way of answering your questions about the future.
Barney and Robin's marriage fell apart, yes, but it took three years. Ted's wife died, but again, it took many years for that to happen. Over long time periods, death and divorce are not at all uncommon, nor is rekindling a relationship with a person you were once close to. It sounds like you're annoyed because the ending felt contrived, but it didn't feel that way at all to me. Given the better part of a decade, the events we saw are, if not the MOST likely possibility, still very common.
I think that's why I liked the ending, really. It wasn't what I was expecting, but it also wasn't a shock. I didn't feel "tricked." I've been worried that they were going to do something stupid like make the mother turn out to be a surrogate or something. Instead of a crazy twist, though, they just added on to what I was expecting. Ted DID get married to an awesome girl and led a happy life. What we've been waiting 9 years for has been fulfilled. They never promised or got us invested in anything past the marriage, though. They delivered as expected, and then added on some future material. That material turned out to be bittersweet, but not too bitter, because we haven't known the mother long, and quite sweet, because they've been building on Robin/Ted forever.