Having a strict deadline looming over you is really effective in overcoming those feelings and replacing them with total panic instead. But to be more serious, it is best to realize that most, if not all of us felt something like this at some point. It is just another part of the usual impostor-syndrome. Talk to your colleagues as a form of group therapy. Also there are two things are good to keep in mind here:
Personal growth: Why do you know now that you could have done better? Congratulations, it's because you improved so much that what was hard to get right back then now seems terribly obvious to you.
Don't waste time on things you cannot change. Worrying about what you did not do does not change your previous work, it only takes away time from other things you could do now, so focus those.
Finally remember all the published work you read while working on your PhD. How much of it was truly perfect? And how much of it was badly written, full of incomprehensible sentences and small mistakes? If the underlying ideas are good enough it will still get published (and worrying about that is your adviser's job). You might not get it accepted on the first try, in your favorite top journal, but again that happens to everyone.
So in short, just try to "get on with it". (But as a footnote of course don't be afraid to look for professional help if those feelings start to impair your work.)