When a mimosa tree is foaming it usually means it is dying. It is very difficult to help these trees. I would suggest fertilizing with an anit-fungal fertilizer. This may help depending on how bad the tree is. You can buy this fertilizer at any nursery and some hardware stores.