Well, I think somebody wanted to say something about this battle.
https://replay.pokemonshowdown.com/pokecommunity-ou-166467
Yeah, I requested that you post this because this to me is a good example of a game that was lost on the margins, which is to say that "the little things" are what did you in. Going into a fair amount of depth, so buckle up.
Team Preview: If his Mega Altaria gets a free switch-in and is any variant with Earthquake, you're toast, though Ice Shard helps a bit with DD Altaria. The tank gets a free kill every time it comes in. While his team is otherwise Keldeo weak, you can't afford to give Altaria a free set-up. The Alakazam is also a problem as well, though Weavile helps you play around it some. The strategy here has to be aggressively pressuring the Altaria. All he has to do is remove the Heatran, if that, and get a free DD on the Shaymin. You have to be very proactive about killing it. If Alakazam or Altaria dies, your path to victory becomes a lot clearer. If you have Icy Wind on the Keldeo (and you should with such an Altaria weak team), then that might be a good early game play.
Turn 1: I liked the lead choice, and the double switch seemed like a reasonable risk.
Turn 2: I do feel like the burn bailed you out a bit here. I definitely would have used Icy Wind if you had it since the worst-case scenario is that Skarmory Roost scouts you, and then you can go straight to Heatran and get to work anyway. That said, Scald wasn't a bad play here (and was the right play if you aren't carrying Icy Wind) since Altaria isn't going to want to risk setting up on a burn unless it has Heal Bell, in which case Heatran beats it anyway. So this is less a critique and more "here's another option," but yeah.
Turn 4: Early SR, good. This keeps the pressure on Altaria a lot with its burn. Even so early, you have gotten off to an excellent start.
Turn 5: Safe play, fair enough.
Turn 6: This worked out well for you since the Weavile (potentially with Pursuit) was too threatening for him to ignore. Solid play, especially since you're pretty Alakazam weak.
Turn 9: This was actually the proper play, though luckily the miss doesn't cost you. You actually did need the extra bit of power to move past it.
Turn 11: This was a very nice and secured the defeat of the most threatening Pokemon to your team, though Heal Bell reveals it wasn't a 6-0 waiting to happen. Even so, Keldeo gets a free kill every time it comes in now. You basically win this game in the early game (though Alakazam can still sweep you) and then you kind of give it away. I'll go into depth as to how.
Turn 14: You made the right play here. You can't let Manaphy get going, while Skarmory is far less threatening to you.
Turn 17: There is absolutely no reason to Hydro Pump here. You certainly do not need the extra power to mow down Skarmory:
252 SpA Choice Specs Keldeo Scald vs. 252 HP / 252+ SpD Skarmory: 177-208 (52.9 - 62.2%) -- guaranteed 2HKO after Leftovers recovery
It is unlikely that the Skarmory is that invested in Special Defense, though in this case it doesn't even matter.
What else does Hydro Pump hit that Scald does not? It might help with Manaphy, but a Scald burn basically ruins it and you have multiple checks to it, so giving it a free set-up isn't such a big deal. You have to make safe plays when you can. A huge amount of hax is avoidable and the miss here was one such instance. You could have gotten a free burn on it given what Dave chose to do, and you would have maintained momentum no matter what. This was a big missed opportunity to punch a hole in either Skarmory or Manaphy.
Turn 19: Good to get his hazards away.
Turn 21: In this spot, his hazards are gone, so he can't WW you to death. I think you absolutely have to double switch here: the risk is very low and you can abuse more Pokemon with Keldeo. If you keep it in, there's no way he's sacking the Skarm this early, so I would at least Earth Power to hit both plausible switch-ins (Manaphy and his Heatran) for decent damage. Even so, not the worst play, just a very safe one.
Turn 22: Obviously the risk of your play is high, as you lose your Heatran. Are there lower risk plays available? He is probably maximum Speed since he's Balloon Tran, but Latias can sponge a hit and Defog SR away. Altaria can come in and force it out depending on how much Speed you're running. Either way, disaster can't strike like it did here. You only want to sac when you have to, and here, Speed tie or not, you didn't.
Turn 23: Hindsight is 20/20, but this would have been a great time to Secret Sword. Alakazam can't take that hit well at all either:
252 SpA Choice Specs Keldeo Secret Sword vs. 0 HP / 4 Def Alakazam: 192-226 (76.4 - 90%) -- guaranteed 2HKO
I think he would have been insane to switch his Landorus-T in.
Turn 27: Hehe, sometimes you just guess wrong.
Turn 29: I didn't love the Lati switch to begin with since it puts you in precisely this position. I would have recovered off health here though if you were going to stay in.
Turn 31: At this point, you have to put yourself in his shoes. He has no reason to risk his Heatran here when so many Altaria carry Earthquake. I would have double switched into Latias or Keldeo, probably the former to remove the hazards.
Turn 32: Either Iron Head or Whirlwind does you in here if you switch Lati in. You're already in a tough spot (which is why Turn 31 was important--you weren't thinking turns ahead there) and you guaranteed death by hazards here. Ruh roh.
Turn 33: There is *still* no reason not to Scald. Shaymin can still remove Manaphy, as can Weavile. The miss on the next turn...you kind of set yourself up for it.
Turn 36: I thought this was a low reward play and thought Seed Flare would have been better. If you want to hit Skarmory, hit it once it comes in, since it can't punish you much. You are just killing off your pokes now with overpredictions. :(
Turn 37: The crit bailed you out a bit here, since Scald would have wasted this thing and Knock doesn't OHKO.
Turn 40: It doesn't matter at this point, but the there is *STILL* no reason to risk the miss here.
Turn 41: Crit didn't matter since the Landorus-T cleans you anyway. :(
Conclusions: You have to minimize risk in Pokemon. I first watched this when gloom was visiting and she said something like, "wow, he really gave that away." Indeed. Your early game lead was excellent, but you kept giving him free turns with Hydro Pump misses. You don't always need to secure 2HKOs in the immediate term. The only thing Hydro Pump helped with was Manaphy, but you had an entire defensive backbone to remove it. Furthermore, Scald gets free damage on it (and can put it on a timer with a burn) which means that the next time it comes in, Keldeo can overpower it. You misused your wincon and it hurt you a lot. You legitimately would have been better off with a three-move Keldeo. ;(
For next time, think turns ahead. Minimize risk. Only use Hydro Pump when Scald could yield a game-altering set-up opportunity or recovery (like from a Slowbro or something).
Also, I perceived that your game began to slip once he started frustrating you mid game. The Altaria-Skarmory-Latias sequence was a sort of reversion to thinking one turn at a time instead of seeing the big picture.
Your early game was very good. If you apply pressure like that on your opponents, you will do well. Feel free to ask me any questions.
EDIT: Also, Shaymin is a pretty sub-optimal choice. ;(