Keep trying
That’s the only way things seem to get done. By really trying. Putting as much effort in as possible, until the time comes that either inspiration sets in, or another way becomes obvious, or for some reason the problem just disappears in some way.
I think the worst thing is if one gives up, no matter how tempting. A task can be put aside or attention can be diverted someplace else, and that would seem like circumventing the problem – giving up, but it’s just getting to a solution by a different route.
Must. Not. Give. Up.
:)