My guess is that if you look in the foamy glob you will find a froghopper, a little grub that makes the foam to protect itself and sucks juice from the leaves, but I am on another continent, so maybe something different. I don't know about the black spots, possibly fungal?. My guess is it would be fine to eat, but I don't know, and I would be tempted to cut it right down hard and give it a good water so you get some fresh, uninfected growth.
Unusual, mint is usually pretty bomb proof.