Let me clue you in, it's never going to be perfect. At some point it has to be "good enough" and you stick a fork in it, and call it "done." Will it be perfect? Nope. I can pick up Hammer of Thor (my first published novel) and find things where I think "I could have written that better." But if the book were still on my hard drive being revised again and again, no one would be reading it. If it weren't "good enough" I wouldn't have mostly positive reviews.
Yes, you need to edit it. Your first draft will be pretty bad. A while back I wrote this post on editing you might find helpful.
But when is it good enough? That is very subjective. I think my freelance writing has helped me with this because I am given discrete, hard deadlines. I make the story as good as I can in the time allowed (although I also often submit early because I think it's "good enough"). I would say when you can read it and like it all it is good enough. When your beta readers like it, it is good enough. Of course, if you can get an agent or publisher to like it, it is good enough but that's hard to do unless it's already good enough.
So here's some tips:
- Edit/revise until you like it
- Have others read it, see if they like it. Make revisions as necessary
- Let it sit for a month or more, then go through it again.
- If you still like it, it's probably good enough.
Now you may be a no-talent hack and it'll never be good enough. But I'm pretty sure you aren't. You're a good writer and you write good stuff. It will be, at some point, "good enough." And that's another key: have confidence. Don't be arrogant, of course, take constructive feedback from beta readers and others. But be confident in your ability to write.
Again, this is all very subjective, but writing is subjective. If it was math, anyone could do it (yes, I know there's lots of people who can't do math). Feedback is important. Confidence is important. Being your own best editor is important.
But at some point you have to stick of fork in it and call it "done."
And then your publisher will wonder why the manuscript has holes in it.