Kinda confused...is the question about the specific problem of learning new libraries, the general problem of setup/dependency/documentation hell, or the even more general problem of dealing with frustration?
For libraries, I just accept that it'll take a long time to get familiar with them, and dive in. That's what Hello World is for, anyway. If I've got them setup and working and still have a tough time mastering the library (bad documentation, for example), I'll often just ditch the library.
For setup/dependency/documentation hell, depends on the language. I use setuptools for all my Python-related code, and use it's dependency-management functionality whenever libraries support it. Small 3rd-party libraries (no more than a source file) get pulled directly into our source code repository, larger ones are easy_installed, with a shell script to take care of everything that isn't available via easy_install. HTML, CSS, and images get packaged along with the web framework code they're associated with, and installed via setuptools. I wrote a custom documentation/dependency analyzer for JavaScript, and use that for all our JavaScript. It's wrapped in a setuptools package that just consists of a library of build scripts, the JavaScript being pulled in through pkg_resources.
As for frustration, I usually go do something else. Oftentimes, when I return to the difficult part, I find it's become irrelevant.