I know what you mean. I've been on again and off again. I just got off the phone with my mother who spent the majority of the time telling me about yet another weight related ailment she's got. I'm starting to feel a twinge here or there that I shouldn't be.
Ways to get back on track...
Just do it. Just start. Starting is the hardest part. Once you start everything will roll back into place.
Make a list of reasons why you want to be healthier, make many, many copies and put them in the most conspicious places you can find. That way when you need a reason to exercise or bypass that yummy piece of cheesecake, it will be conveniently right there.
Take it one pound at a time. My father told me this fabulous story about Zig Ziglar (I think). At one time he was fifty pounds overweight. He would yo-yo as most people do until one day he realized that the reason why he couldn't stay on the diet was because he was thinking of the problem as a whole (OMG I've got fifty pounds to lose!!!) So he broke it up into small pieces and by small I mean he calculated down to how many ounces per day he would have to lose to reach his goal within a certain amount of time. Then he figured out what he would have to do everyday to lose that many ounces per day. So he focussed on what he needed to do today to lose X amount of ounces and he did that everyday until he lost the weight.
This is so cool that I'm going to try it. Trying to lose 2.2 oz per day (~1 lb per week) sounds so much more attainable than trying to drop 187lbs in 187 weeks (~3.6 years). It makes me want to pass out when I think about the latter.
Anyway, hope this helps and Good Luck! We are all here to help and support you