I think you have to try to recapture whatever it was that made you want to lose weight in the first place.
You mention not eating right. Are you having trouble eating correctly at home, or eating out?
If the problem is at home, the solution may just be to get rid of the trouble foods. You can't eat what isn't there. Eating out can be more tricky. I always struggle to stay within my calorie range when eating out.
In any case, look at the positives. You have maintained for the past few months, so at least you aren't heading in the wrong direction anymore. With just a few changes, which you have already done in the past, you will be back on track and losing again.