Well, the first step is to realize what happened.
Here, after 10. O-O-O, you could have won a rook with 11. Bg5. (If black were to play Bb4 after that, c3 would counter-attack the bishop and stop them from stopping your skewer.)
Instead, you played 11. a3, which would normally be an OK move (I see you were trying to prevent the dark-squared bishop from developing w/ tempo) if not for the fact that it missed the skewer.
Of course, 16. Rf4 was the "disastrous" move that solidified the game (Rd5 was best), but you still weren't losing that badly. The final position is only -0.9, so you definitely still had a chance.
Additionally, you should understand you're not going to play like a beast all the time. Everyone plays an "embarrassing" game occasionally — sometimes multiple times in a row. Be sure to notice when your playing is not optimal and stop for the time being so you don't go on a downward spiral.
Is it just me who has a massive problem with consistency?? In a good state, I can produce a batch of games at 80%+ accuracy, and then I produce something like this gem of a disaster:
Hardly a well-thought move from start to finish. I wish I could claim I were tired or something, but some days stuff like this happens. How do good chess players keep consistent???