Welcome beby32. What do you think makes you go back to gaining? For me it was distraction. If I was stressed, bored, depressed even happy, I would eat. I noticed that when I did that my problems would go away while eating then come back stronger when I was done.
I started off little by taking vitamins and fish oil, after 2 weeks of that I started walking more. Following through with those small things lifted my mood up and motivated me to talk with my doctor to set up a plan that benefited me. I love to eat so we came up with the eat every 2 hour plan

Its pretty awesome and I have stuck with it for 3 months now and can see myself sticking with it forever! You just need to find the plan you are most comfty with. I know you can do it