Many a times, I get a bit bogged down when I struggle with hard or many a times with medium level questions as well. To overcome that dampening of spirits, I usually do a quick exercise which I find useful in lifiting up my spirits. Sharing it here if others may find it useful well.
Here's what I do, I pick a random set of easy questions which I haven't attempted before and just start solving them. I usually do it in sprints of 10 mins but sometimes extend it to 12-13 minutes if I am in a middle of a question which I am just about to solve but typically do not go beyond 15th minute. Here's an example of 3 questions that I solved in a sprint of about 13 minutes:

Not sure if this helps with my hard and medium problem solving skills but it lifts up my spirits for sure. You may want to experiment the same and feel free to add your sprint times in replies.
Happy leetcoding :) !!