All three moments you remember turned on trusting your read of the position instead of counting it, and all three times the count was better for you than the read. You felt clever at 18, mated at 37, and lost at 42; the engine says winning, level, and losing but still playing. Seventeen moves went by before any of it with nothing flagged, +0.0 to -0.7.
18.c5 -- the bishop was simply hanging
Your read of 17...Bd3 was right: the bishop hit your rook on f1 through the empty e2 square and it hit the c4 pawn, and 18.c5 answered both by attacking the queen on b6. What the scan never reached is that nothing defended d3, and your queen on a3 had a clear third rank in front of her because 17.c4 had just vacated c3.
Qxd3 takes the piece: dxc4 Qxc4+ Kh8 Rb1 Qc7 and you are a clean bishop up at +4.8. Fourteen seconds, and +4.9 became -1.8, the biggest swing of the game. After 18...Qa6 19.Qxa6 Bxa6 the bishop left with tempo and the queens came off, taking the attack with them.
A piece that arrives making two threats has usually had to stand somewhere loose to make them.
37.Rxg4+ -- the knight could not move
No mate was coming here; the position was +0.0. Your king on g2 had the h2 pawn and both rooks nearby, and Black's rook on a1 and bishop eyeing f1 from a6 never got anything going. And 36...Ng4 had blocked your check, leaving that knight pinned to its own king on g5 by your rook on g3, with no legal move at all.
Rxh7 keeps both rooks, wins a pawn and holds: Rxa2+ Kh1 Be2 Rf7 cxd5, still +0.0. Instead a rook went for a frozen piece, and after 37...Kxg4 38.Rg3+ Kf4 you had one rook against rook, bishop and knight at -3.9. You spent 1m51 here, so the time was there; the question it answered was the wrong one.
When mate feels close, name the move that delivers it. If you can't name one, it usually isn't there yet, and paying material to prevent it is paying for nothing.
42.Rg2 -- the rook was the last thing worth keeping
You were losing at -4.2, but not out of resources: a rook on g4 and a pawn on d6 are things an opponent has to work around. 42.Rg2 offered the trade, and after 42...Rxg2+ 43.Kxg2 there was nothing left to work around, at -15.0.
Rg8 keeps the rook busy behind their king: Rd2 Re8+ Kf6 Rf8+ Kg7 is -4.7, lost on paper but a position they still have to prove. As a rule, when you are down a piece every trade helps the player who is up, and the rook is the last unit that can make a mess.
Phase notes
Two flagged middlegame moves had the same shape: 26.e4 pushed a pawn when fxg4 simply recaptured (-0.6 to -2.0), and 29.d5 pushed again when Rc3 Nh6 held things together (+0.4 to -0.8).
Profile check
This contradicts a saved item. Underrating your own position was down as fixed and clean for seven games; it came back twice here, as an imagined mate on 37 and a resignation-by-move on 42. Back on the list.
It confirms the older habit in its defending form: at +4.9 the fast, natural move went down in fourteen seconds, the same shape as 17...O-O in the Caro-Kann against David on 07-24.
What to drill next
- The position before 18.c5. Beat the engine from there three times running.
- Hanging-piece puzzles, to make "can I just take it?" the first question rather than the third.
- Rook endgames, then survive twenty moves from the move 42 position.
When a piece lands in your position making threats, the first question is not how to answer them: it is whether it can be taken.