Have you tried talking to your doctor about getting actual pain relief? I was recently suffering from several issues (back, hip, tendonitis) and my doctor gave me a script for prescription-strength naproxen; the ibuprofen wasn't cutting it any more. That may address the pain issue.
Focus is harder. Changing habits is harder. I'm dealing with some of this right now and I have to say, changing our thinking about food is part of it. Not the 'I deserve a bowl of chips tonight while watching tv' thinking, but the 'okay, so I had a few chips and sort of blew it this evening, but this doesn't have to be a habit'.
I know that I sometimes feel entitled to something yummy after a hard day. My weakness is for salty crunchy foods. Part of the strategy is just not even buying them or bringing them into the house. The other part is developing the habit of NOT eating them because I do not want to stay this size forever.
And walking helps, a lot. If you have a good pair of shoes, it is relatively low-impact and you can do a lot of steps in a short amount of time, believe it or not. Even if you can't go to the gym in the evening, tell your husband you need an hour to go and walk. If walking in your neighborhood isn't great, consider a treadmill.
My strategy for getting sidetracked is to acknowledge that it's just a bump in the road, but not the end of the road. Today, for example, I didn't get the jump on things and get my steps in early enough-- I don't do well in the heat. Tomorrow I'm going to go and walk in the morning instead.
It's not easy for me, either. What keeps me going? Knowing that it will be easier to find clothes that fit for me as I lose weight. Knowing that on the days I do walk, I have more energy and am in a better mood. Inventory the benefits and enjoy them. I don't have any other great advice, just prioritize it and schedule it. Some days, I'm not as good at this as others, but being loving with oneself is knowing that we do make mistakes but don't have to throw in the towel or beat ourselves up. Tomorrow is another day!