I'm so sorry you are going through this. Trust me, we've all been through times like this, so we understand. Really.
Here is my advice: put the past few weeks in the past, where they belong. Stop worrying over them or detailing in your mind what you did wrong. Stop feeling bad about it and instead take some positive action. Get up right now, grab a sheet of paper and write down all your goals and WHY they are important to you. Read that list several times. Post that list in several prominent places so you can keep your goals front and center. Realize that nobody can stop you from reaching those goals except YOU! You DO have the power to make those goals reality, but it will be tough. Weight loss isn't easy for most of us. That's just a fact. Dramatically changing our entire lifestyles is not easy, it just isn't. So know that, accept it, and then realize that you can STILL ACHIEVE those goals. But nobody can do it except YOU.
Next, write out an overall plan for next week -- what you'll eat and if you can exercise, schedule some of that, too. If you can't that's fine. It isn't necessary to start. If you feel overwhelmed, start just with meal planning -- I personally think more than 90% of weight loss is managing food anyway.
The journey to achieving your goals is a million small steps just like the ones above. Once you have your plan, take it one day at a time, even one step at a time. You CAN do this.