When you are depressed, it can be very easy to fall into a trap of obsessing over every little mistake you make. This can make it very difficult to be happy. This is not helped by marketing campaigns that teach us that we can only be happy if we have the perfect job, the perfect girlfriend, the perfect car. Of course, depressed or otherwise, no one is perfect and it can be a tremendous waste of time trying to be.
So how can you avoid feeling like you need to be perfect? There are some books out there that you can look at. One that helped me a lot is When Perfect Isn't Good Enough. It helped me realize that I was spending too much time wanting things to be better than they were, instead of accepting that sometimes things just aren't going to work out.
One thing that also helps is to keep things in perspective. Are people really going to notice a small stain on my pants? Is that extra point on homework really going to affect my grade that much? Sometimes you do need to fix things, but you may be surprised at how much better you feel when you stop sweating the small stuff. This doesn't mean you should drastically lower your standards. It just means that perfection is extremely difficult and you are probably better off letting it be. It's one thing to always want to go the extra mile, but it's quite another to beat yourself up over not being perfect.
Realize that perfection will not bring you happiness and then you will know that it's only by embracing our imperfections that we can be truly happy.