Your violas/pansies are nearing the end of their natural life cycle - the “balls” are the seed pods. You can harvest them as soon as they start to open or wait and see whether they seed themselves. Some seed pods have already dispersed their seeds, so don’t be surprised if little seedlings appear at some point.
The plants have kept growing new stems and blooms at the ends of the branches, getting more and more lanky top-heavy. Often there comes a time when they can’t support themselves any longer and they start to flop. A heavy rain, hard watering or a lazy cat can trigger it.
There’s little you can do now, especially as they are quite bare in the core, but before you rip them out, you can try to prune them back now and hope that they will grow again from the center. Do fertilize, but don’t overdo it, or you will encourage more lanky growth. Ultimately, they will die, they are annual or short-lived perennials.
So yes, the brown balls in your question are indeed causing your flowers to die, but that’s more a philosophical answer.