How could I have avoided this accident? On Sunday I wanted to use my free day and I planned to do a half-day ride with my mountain bike. The weather wasn't really good, but at least it wasn't raining as the days before. 

I rode up a mountain for approximately 2 hours and then after a short break I wanted to ride down the other side of this mountain. I'd chosen a small path that was very muddy. Actually, it was so muddy, that my front wheel got stuck into the mud and I flew over my bike. Fortunately it wasn't too steep there and I hadn't been riding too fast (~30 km/h) so that I didn't hurt myself expect for some minor scratches on my arms and a not so deep cut in my forehead. 

I finished the rest of my ride very carefully, but while I was riding, I was thinking a lot about how I could have avoided that accident. Obviously it would have been a good idea to avoid the situation in the first place, but once when you're on such a path what is a good tactic? 

Should I ride as fast as possible so that my wheels can't get stuck? Or should I ride slowly? Which brakes should I use to brake?
My tactic would be slower not faster and basically minimise the weight over the front wheel as much as possible by moving my backside as far back as possible. With higher speed and weight at the front I'd say you're more likely to dig the front wheel in.

Again I'd use the back brake, you need the front for steering as much as possible and you may loose that with braking on the front, also with the weight at the back the rear will be better for braking.

Forgot to add,  try braking as much as possible before the muddy bit, and as little as possible whilst going through the mud. Braking will load up the front wheel and hence more likely to dig in.