Don't let this happen to you!
This video shows the sad truth of how derogatorily most musicians self criticize during performance and practice.
I learned from a wise yoga instructor, that learning to meditate is much like training a puppy to stay in one spot. The puppy will wander off and the trainer will gently guide the puppy back to the spot until he learns to stay there. Our "puppy mind" is much the same. Other thoughts will intrude, especially until we get used to thinking of just the music itself. When your thoughts wander, gently guide your mind back to the music. Be kind to yourself. If you are having too much frustration or difficulty focusing, take a break. Then return and remember to sing and love each note.