I would pick the ripe fruits - this might give your plant a little bit more strength. however, these plants look like mine when I've grown them in pots and brought them in for winter. Most people grow them as annuals (and this is what I do with my raised bed plants, just letting the frost kill them).
I have had some mixed success over-wintering them in pots, although it is patchy and some years none survive. They seem prone to disease. Leaves fall off (as per yours), but as long as some green stem survives into spring, then you should be able to grow the plant again and get lots of fruit from it. I don't know if it makes a difference, but when I've done this, I've always planted the plant into a bed outside for the new year.