Yes, that clarifies your question much better.
If you have a piano with a sostenuto pedal in the middle, this solves the problem for you, but most upright pianos do not have a sostenuto pedal.
Just follow the pedal markings - a good firm accent on the F should be enough to keep it going. I would hold the F, after an accent, and pump the damper pedal if there is no sostenuto pedal. This would be my way of managing it, I don't know if it is the right way.