I think most of us here have been in the same state of mind at one point or another. The key is how to get out of this state of mind? For me, it's to make a commitment. I make that commitment every day...especially if I've slipped or have even fallen off the cliff!
Make a decision that today is a new day. Forget the past (unless you choose to learn from it...which is ideal actually) but why punish yourself for being human? Today you will move on. You will take it step by step and one minute at a time if you have to. You will follow your plan and you will do what you need to do.
I have to count my calories for all that to happen.
Exercise helps me stay focused.
If the scale isn't helping me, I stop weighing for a while and trust in the process.
If I need support, I come here and post, read, etc.
I had a slip and I regained more than 50 of the 70 lbs. that I'd lost. It was incredibly difficult to get back on track, but you'll be surprised at how quickly good habits can help us regain our happiness. I still have tough days but overall, I am SO glad I didn't give up. Please join me and we can do it!