Weight loss

Hi ladies. I have been so depressed lately just by looking at myself. I want so badly to slim down. I am 5'3 and weigh 170. I need to lose at least 40. I can't stand it anymore. I could really use some motivation. I have a rare bone and joint syndrome. Working out is so painful for me but so is being heavy. I should've never let it get this far. Any advise, tips or reassurance would be appreciated. Thank you