Wow a loss of 170lbs is very impressive!!!
Even though you gained some of it back, it sounds like you are ready to get back on track. You obviously have the determination so just take it one day at a time. Don't look at the past and get down on yourself about it, but look to the future and what you can accomplish. Good luck.