Detect valleys of a signal
First, you'll probably have better luck posting this on dsp.stackexchange.  That's a more specialized group that does stuff like this all the time.

In terms of your problem, here's a couple of options.

One is a machine learning approach.  e.g. create a training set by taking a bunch of data and hand marking the points that are good versus bad (like you've done above).  Then take an Artificial Neural Network, feed it the training data and teach it to recognize the pattern you want.  

Another approach might be to take a Statistical process control approach.  Lots of tools there for detecting when something gets out of line.

Another way might a floating threshhold.  Compute the mean of the last X samples, and if the signal drops more than Y below that mean, call it bad.  could also compute the standard deviation of the last X samples, and if the signal drops more than Z std devs then call it back.  

or, potentially just high-pass filter the signal to remove the slowly drifting mean and then you can use a fixed threshhold.