Most commonly used in the same context as "oh, damn". Used to express frustration, anxiety, depression, etc. Ocasionally the second syllable is prolonged to demonstrate any emotion in an extreme fashion.
As an exclamation on it's own: Instead of "I can't believe I'm so stupid!", just use "Blerg!"