Back on the wagon

In March of this year I stepped on the scale and saw 215. It literally shattered me. I never expected myself to get to this point. I knew something needed to be done, so I got a gym membership and changed my diet. I began eating clean and working out 5x a week. In 4 months I lost a little over 30 lbs and I was ecstatic; feeling good & looking good. I knew I had at least 30 more to go to hit my goal, I was motivated and knew I could do it. However, in July I severely sprained my ankle and needed a boot and crutches. I was immobile for almost 2 months, and this caused me to fall off the diet wagon as well. Once I was clear to go back to the gym, I began going in random spurts and I was just not motivated the way I was before. I ended up gaining 7 lbs back and I feel horrible. I just can’t get motivated. Does anyone have any success stories, advice or ideas to help me get back on the wagon?