Wisely time-limit your research
There's nothing wrong with exploring other ways (hopefully better) to solve the same problem, but stay pragmatic and assign yourself some predefined time to do this research. It should be proportional to the problem at hand. When time's up simply stop. During this time I suggest you also talk to your fellow developer because more heads usually also means more knowledge/ideas.
If you find it hard to implement the solution in the end I suggest you write down your process the way it should work and then start implementing it. It will keep you focused and help you wrote just enough code. TDD might help you with this as well. So instead of describing your process, you could first write a unit test and then implement it so that it passes the test. And you're done.
Sometimes you should avoid it
When you're faced with simple/basic problems. Solving them in other ways may not produce that much positives as your research would take (in this case wasted time). It's not wise to do it on these problems but rather just simply implement them.