That's absolutely right (as I see it)...you've got to deal with your own issues as well. Your hurt feelings (and we all have those), the feelings of rejection etc.
Do some soul-searching and find out what makes you feel good about yourself (that you can do, don't rely on him for this). Whether it's working out at the gym...to get those endorphins cranking, spending time with the kids, whatever. Just try to get yourself out of your funk.
It's really hard to try to work on your marriage and give things a real chance to work for you if you're in a bad mood...know what I mean? I know it's not an easy thing to do, but try.
I know it sounds really corny but for me...I literally look in the mirror each day and say affirmations that work for me. It at least gets me going on the right track.