Welcome to TFP!
You appear to have used one of the foaming algaecides. The only thing you can do about the foam is to wait several days to a week, at which point the foam will go away on it's own.
We don't recommend using algaecide when fighting algae. Algaecide is fairly good at preventing algae from getting started, but it doesn't do very much against an active algae bloom.
When you do use algaecide, we only recommend using a class of algaecides that we call polyquat, which contain the active ingredient "Poly[oxyethylene(dimethyliminio)ethylene(dimethyliminio)ethylene dichloride" usually at a 60% concentration, but occasionally at a 30% concentration.