Just because you “failed” doesn’t mean every element of your plan is complete crap. There are nuggets of gold inside that you can build off of. Ask questions: of yourself, people around you whom you trust, and the ones whom your plan affects. Take the good stuff and ditch the rest.
This works in relationships, in life, and in business.
To put it in business terms (an arbitrary example): The next “big thing” you invented may not work as an all-purpose bug spray as you intended; but it could be a big seller as a sealant for wooden patio decks.
But first you have to: mourn your “failure,” reset, ask questions about your invention, and then move forward with your findings.
You could be on to some great things with a change of mindset.