If the bent over part is soft and mushy it probably is suffering from soil that is too wet. Cut the bad part off throw the bad in the trash. Mix 75% sand with 25% potting soil and plant the cactus in it. Keep it in out side in the shade when the temperate is in the 70s it will grow new roots..