I've been through this a few times during my career.

This book helped me put it in perspective: https://pragprog.com/titles/cfcar2/the-passionate-programmer...