Exactly this.
When I was younger I had a hard time dealing with depression. It was the easier road than trying to fight my way out of it all the time. Eventually I found that self-pity was a trap; it's a way of gratifying myself with pity, but it also made me re-live and re-think all the stuff that made me upset, so it just kept recycling through my mind. That got to be a habit, and breaking any habit can be hard.
Once I started making a point of putting on a brave face and finding the good in things and doing good for others, even when it took an effort, I started forging new pathways in my brain, created positive habits and adopted a different outlook. If you look for the bad in anything, you will find it, whether it's really there or just imagined. But there is good everywhere. It just takes an effort sometimes to let it sink in, especially when you have a negative attitude. It's worth the effort to find the good though, that's where the real difference in life is found.