Hard fought game. Take a look at the position after 21. Qb3.....I think Qxd4+ followed by Qxg2 and the white king is stuck in the center with a very bad game. When you are attacking, look for better moves and look for ways to keep your pieces in the game. After 24. 0-0, the game is nearly equal. Actually, once you find any move that you think is decent, look for better moves.
Move 24. Bf4 tells me you are trying to attack a piece that is blocking your access to the e-file. Try to calculate ahead to see what the usefulness of the file is. White is under no obligation to exchange rooks on e1 (g3 was a must for him since Bh2 would have won the exchange). So at this point, I think you undercalculated the position. Bxa7 equalizes the small advantage that you had.
Going back to move 24, knowing that your attack on the white king is dead, your thoughts should be, how should I arrange my pieces so that I protect all my weak pawns on the 7th rank (not to mention my bishop on c7) and what is white trying to accomplish here? White has a decent endgame here. Let's look a few quick moves. Say 24....a6 (protecting that pawn from attack), 25. Rd1 - if you respond Re7, black responds Bc5 attacking the Rook. No good. The natural defending square of Re7 is problematic. OK, how about 25.....Rd8. 26. Rxd8 Bxd8. 27. Rd3 attacking the bishop and getting ready to enter the 7th rank to attack those juicy pawns on the Queenside. No good.
OK, so a6 is too slow of a move and black can't defend with a6. How about 24. Bb6 - protecting the a-pawn, moving the bishop to a better square, helping to relieve that 7th rank pressure and forcing the exchange? If the exchange doesn't happen, then Bxe3 followed by Rxe3 (when the pawn takes back) wins a pawn. Seems like progress since any white rook move to the d-file can now be met by Re7 which protects the valuable 7th rank.
A strong player on move 21, might look at the endgame after Qxb3 and probably rule it out. I think your endgame advantage is pretty small after this move. The doubled rooks look impressive but they are not so useful because the bishop on d3 defends so well.
Here are my suggestions for improving your endgame skills: calculate much deeper and pick up a book on endgame principles - I really like Silman's Complete Endgame Course but there are other books too. Also, don't be in a rush to exchange off your attacking pieces.
Once you shore-up your endgames skills, you'll find that don't have to embark on so many dubious attacks because you can rely on your endgame skills to carry you through to the end. It really frees up your game.
How can I improve?
This following game is an example of my endgame play. We were pretty even going into the endgame, but I was terrible and I think pretty much gave him the win.