Depression, in my experience, is the diminishment of these feelings. When you do something that should make you happy by all reasonable measures, you aren't happy. When you do something that should make you sad, you don't feel any worse. When you do nothing, you don't feel any different. A lack of those fundamental feelings is to blame.
There is no way to think yourself out of it because the solution is irrational. They are feelings that healthy humans have, nothing more than that. Willpower is your only tool here. You can irrationally will yourself to seek solutions. You can practice clever ways to coax those feelings back into existence. You can take medicine to promote those feelings. In any case those feelings will probably return, as depression is typically episodic, and you can start being happy again by doing what's good and doing what's right and being successful.
But the better you do the harder you'll fall when those feelings subside again and you're given another lesson about how all that "good" shit you did doesn't matter. One night when your happiness is in full swing, it'll just hit you. You wonder why you did any of it. And no matter what you do or think, your happiness is gone. Habits may carry you a while, but all motivation has vanished. You won't feel like pursuing your own happiness, but you'll feel a lot of other shit that's not so pleasant. You'll pretend nothing has changed, but it's just an act. You'll stretch your willpower to cover the void. If it's enough to bridge the gap, then congratulations on being functioning. If not, then welcome to the club.
P.S. I'm not suicidal. Don't worry about that. I've received a lot of messages from sufferers of depression, thanking me and wishing me well. Though I've responded to very few, I do feel a responsibility. And as I've been acting out this week, it worries me that someone may view my weakness as an excuse to indulge in their own, perhaps doing more damage to themselves than I'm doing to myself. I've willed myself to behave and focus for long enough to write this to remind you that our feelings are diminished, not gone. Even as I write this, I feel a spark, and I hope this reminder gives you one too.