Video games are (usually) designed in such a way that there is a guaranteed path to victory. You just need to find it. So failing means you found one more path that doesn't lead to victory. That mindset helps motivate me to keep trying until I find the path that the designers made for me to find.
Life is not that way, unfortunately. There are plenty of no-win scenarios. Running into those makes me want to curl up in a ball under a blanket and run away from my problems.
I'm currently experiencing this, which is why I'm on lemmy instead of working. I'm currently in database hell and I can't find the way out.