I can very much identify with having gotten to a certain place, and then having lost it, and subsequently "backsliding" quite a bit.
And the frustration with seeing the distance between where "there" was, and where you are now.
And the impatience with wanting that gap to magically go away.
And the self-judgment that comes with having "allowed" that "fall from grace".
But here's the thing... it happened. Here is where you are.
Part of the trick to moving forward is ceasing to compare now to then, and here to there.
You've grasped that you can't do it in the comparison to "perfect marriage" to "failed marriage".
Or "the life I wanted" and "the life I have".
You get that indulging in that stuff keeps you stuck... that you have to accept reality as it is, and not cling to images and hopes from the past.
Well, that has to even include recent past images of yourself!
Even as recent as yesterday.
"Damn, I felt like a million bucks yesterday! Why do I feel like I'm buried under a million pounds of SHIT today???"
Part of what makes the shit day as difficult as it is, is comparing it to the fabulous day. Let a shit day be a shit day... don't burden your shit-self with your YAY self.
If you need to be bitchy, let that inner bitch fly, don't let yesterday's happy-snappy fly in and judge that bitch.
BE WHO YOU ARE, IN EACH MOMENT THAT YOU ARE.
When you really pull that off, a funny thing happens... if you really can pull yourself out of a funk, you will. But not because you judged it, told yourself that you're wrong for being in a funk, and shamed yourself into being a happier person (because, yeah, like THAT happens so often, and SO successfully...), but because you give yourself the *space* to move into to... the groovy space awaits all that will get their groove on in it!
And when you won't, you don't. No big. The groove still awaits. The funk never dies.

Don't miss who you were. Love who you are.
Loving who you are will get you back to where you were.
Or better yet, will get you to a you that's even better!
Do you think you've been the best you ever? No? Then ASSUME that every moment of your life is part of the perfect process of getting to the best you ever.
(And BTW... just so you know... you're already the best you ever. You can't improve on you. You are you. It doesn't get any better, or any worse. Just because you SAY it's better because this or that has changed, doesn't make it true. You're a fabulous you now, you'll be an equally fabulous you then.)