You're going to be going through a really tough time emotionally for quite some time hon... *hugs*
Think of losing weight as your positive thing through it all. It's something you can control and influence, it will give you more self esteem, as you say, and is something so personal to you that nobody else can take away from you...if you see what I mean!
It would be so easy to turn to food to comfort yourself, but this wouldn't be a good thing...so your idea to lose weight is perfect. You'll be healthier, feel better and probably stronger to deal with all the sh*t you're going to have to deal with.
Good luck...and don't forget that there's oodles of support here when you need it.