"So much for ___" is something that you say when you're giving up. You've realized that you won't be able to do what you wanted to do. The most common use of "So much for ___" is this:
So much for that idea!
You say "So much for that idea" when you're trying to solve a problem, and you've tried one solution to the problem but it didn't work.
The other way that "So much for ___" works is by adding a gerund afterward:
It's already ten thirty? So much for getting an early start!
Oh no! He saw us? So much for keeping it a surprise.