One thing I've found can help, and that hasn't already been mentioned, is simply doing something that you're good at. The best way is to have a useful, productive job that you do well, but that's not always feasible to arrange. If it's not, you might think about taking up some sort of hobby or craft that interests you and spending enough time on it to do it well.

Being good at something is a surprisingly effective way to not feel good for nothing.