To try and recover it, I'd put all the mixture in a medium sized pan with about four inches of boiling water. Add a cup of real butter and re-cook.

Once finished, place in the fridge till the butter sets. You won't be able to save all of it, but it's better than nothing.

Hope it works out.
What on earth made you use margarine though, especially with an oz?