Why does it have to be one or the other? Why not start learning how to appreciate your body no matter what it looks like? Why not start to identify and respect the amazing things about yourself? Why not acknowledge that your body is pretty dang awesome and always will be?
If you hate yourself now, then no amount of weight loss or physical adjustments will change that. You may think that having a new body will suddenly fix all of your problems and finally let you be happy, but that’s not true - You’ll still hate yourself in the future, except you’ll have less fat. That’s all. Physical changes will not inherently spur on emotional and mental changes.
You shouldn’t have to change your body in order to recognize that you’re a good and worthwhile person. Because you’re still going to be you. The body that you want isn’t going to suddenly make you stop hating the person that’s inside it.
By all means, workout and eat well and live the type of lifestyle that you want to. But don’t think that it will magically change your self-esteem and body image. Attacking your body is a way of treating the symptoms, not the disease - You won’t be happy until you start tackling the reasons behind your feelings and mental state.