Good news! It's slime mold, no need to treat it in any way. It grows on wood chips when conditions are just right. It won't harm your plants or soil.
If you decide to get rid of it, it doesn't take chemicals. Just use a shovel to scoop it up and toss it in the trash.
It's actually interesting stuff, not really a fungus. You can even buy a kit to grow it as a science project, you feed it oatmeal to keep it going.