i had a similar 'problem'. i installed libfreenect (unstable) directly on my system. and now i dont want homebrew to upgrade it. i solved it by deleting following file:
/usr/local/Library/Formula/libfreenect.rb
analogous it would be /usr/local/Library/Formula/erlang.rb for you
I finally found an answer: since commit 85eb73ce there is a pin subcommand available. So ignoring a formula on brew upgrade is as simple as pinning it via brew pin <formula>. To un-pin it, simply invoke brew unpin <formula>.
It is worth noting that brew upgrade <formula> will still update the formula regardless of whether or not it is pinned.
Caveat: This answer is no longer valid for recent versions of Homebrew, since brew pin has been removed.