I know it's a cliche but forcing yourself to exercise when I feel that helps me. It distracts me from that feeling and afterwards I find if I'm "bored" it is much more likely to be the first type OP mentioned because I figured I did something productive (the exercise) so I don't beat myself up.
Of course forcing yourself to do that can be a very big challenge. Just don't wait for when you "want" to do it, cause that won't happen.