Plant small-flowered nectar plants such as Queen Anne's lace near your pansies as a companion plant that will attract ladybugs and lacewings to eat damage-causing aphids.
Remove mulch and dead leaves to promote soil drainage and prevent moist conditions that attract pansy-destroying slugs and snails. Use a trowel to plant small, shallow containers near the pansies flush with the soil, and fill them with beer to drown any slugs and snails.
Shine a flashlight at night to pick off any snails or slugs from pansy blooms and leaves, and place them in a bucket. Sprinkle diatomaceous earth into the bucket and around the plants to kill the slugs and snails.
Check the underside of the pansy petals and leaves for spider mites. Spray all the plants with insecticidal soap if you find any spider mites.
Apply a pesticide that contains fenbutin oxide and acephate if there are still indications of spider mites, worms and flies such as damage to the stem, leaves and blooms of the plant. Be sure to follow the pesticide manufacturer's application directions to completely wipe out the plant infestation.