One way you can introduce this into your own efforts is to give yourself a “struggle timer” as you work on problems. When you feel like giving up and that you can’t possibly figure out the solution to a difficult problem, try setting a timer for another ten minutes to push yourself a bit further.
This is college STEM 101. You keep trying until your brain fries, then you walk away and come back when you've had a break. It's how you end up with take-home, open book, open note, collaborative finals with 5 questions and a 50% pass rate