Encouragement comes from all source. Be it, a source that hurts you, or really encourages you.
One thing I learn, is we choose the feelings we want, whether we want to respond to it happily and positively, or bitterly and sadly, it is entirely up to us.
Someone can scold the hell out of you, but we can always choose how we want to respond to that of being scolded. You can respond being sad and remorse of your actions, or you can just smile and tell yourself about the opportunity to improve yourself :)