Let's take a look at the problems and challenges arising from wipe nights, or even a failed try or two at something on farm.
Mood and Morale
Regardless of why you're wiping, constantly throwing yourself at a seemingly undefeatable boss can make your entire raid force, even those leading it, dejected and unmotivated. It's even more frustrating to be really close to killing something and then wipe to a series of mistakes, or fail to kill a farm boss that you should be overthrowing with ease. All of this is entirely normal and part of raiding, and good raiders have the discipline to keep going through these periods until you make a breakthrough and finally kill it.
How do you deal with an extended period like this? Whether it's hours or days, there are probably steps you can take to help with the mood of the raid and your morale. For example, it obviously depends on your guild's attitude to raiding, but light-hearted jokes and funny music clips (the Benny Hill corpse-run theme) can stop things becoming too depressing, although be really careful with this -- some people don't appreciate it. Officers don't see everything, so if someone is playing particularly well then you can help point this out rather than focusing entirely on the raid's mistakes.
Bear in mind other people's feelings and performance. Some raiders get nervous and perform worse if they're under more scrutiny. If someone does badly at a particular job, instead of hurling abuse at them from the get-go and calling them all kinds of names, let the officers deal with them and tell the officers in private if you see that person repeating their mistake. Of course, your guild culture might be different; if you're used to freely insulting each other for minor slip-ups then all's well, and everyone takes it in good humour. Generally, though, lowering the mood doesn't really help.
If you're running into the same troubles over hours or days, there are other things you might be able to do to help, such as suggesting improvements or fixing problems with your own play. This is all dependent on why you're wiping, though.
Why you wipe and how to fix it
There are a few key reasons behind wipes, and any connoisseur will recognise them all.
Attack of the Stupid. Someone did something extremely idiotic (such as auto-ran into the boss) and you all fell over as a result.
Minor Mistakes. One person, or multiple people, make small mistakes. Cast a spell a little too late, pulled aggro, didn't run away fast enough. One or more people die and it cascades into a wipe.
Healing problems. Something's not quite right with the healing setup and tanks (usually) fall over, shortly followed by the DPS.
Tanking problems. Mob in the wrong place? Adds not picked up? Wearing the wrong gear? Sometimes the tanks are at fault, other times they simply get blamed.
DPS problems. Hit an enrage timer with everyone alive? Most of your DPS failing to pay attention and dead?
Strategy problems. Perhaps what you're doing simply won't work, and you need to take a break and rethink.
Being unprepared. Not having the right resistance gear, a good raid setup or even running out of potions or flasks. Not understanding the boss fights or knowing what to do. This could be the raid as a whole, or simply individual mistakes that can be corrected with a bit of preparation.
Of course, just when you think you've seen every type of wipe possible, one will come along that doesn't fit into the above categories. Feel free to share your stories in the comments below!
So, how do people fix wipes? Using combat logs, or addons such as Grim Reaper can help you analyse exactly why people died, and staying on the ball to watch what happens to the raid during the fight itself is paramount. It's quite difficult keeping track of everything that's going on as a raid leader, especially if (say) you're trying to tank at the same time, so having officers that you know will help with feedback and getting help from members is useful too. However, try not to point fingers too much. Sometimes everyone knows who screwed up and it doesn't need to be re-stated ten times; just pick yourselves up and move on, if you're confident that it won't happen again.
Adding encounter-specific buffs and debuffs to Grid helps, as does asking people what happened to them and checking that they know how to avoid repeating it. However, don't look too clueless! If the raid leader is asking "so.. why did we wipe?" it doesn't instil confidence in the rest of the raid. Even if you don't know because your position in the raid couldn't observe what happened, ask the other officers who might have an idea.
It's important to listen to your raiders, but it can also be extremely irritating if twenty people have the next bright idea that you've already discarded or that misses a fundamental problem with what you're doing. One way to deflect suggestions that aren't critical to the raid's current exact strategy is to ask people to post them on the guild's forums, or discuss it after the raid. It helps to make people realise they're being listened to, and keeps morale up. Sometimes, suggestions are simple and relevant, and one small change can make a big difference -- it's amazing how people react to a tiny change after hours of wiping on the same thing.
If strategy or preparation are your problem, sometimes wiping on the same thing for the rest of the night isn't going to help unless you make on-the-fly strategy changes. At times like this, sometimes you have to call the raid, which inevitably leads to people feeling disappointed and let down. From their point of view, they were playing perfectly and doing everything they could -- why stop? Point out in clear terms why you are stopping the raid and start a discussion in guild, on voice or on the forums to make sure it doesn't happen again.
The first time you wipe, your raid reforms, rebuffs and thinks to itself "okay, this is it". The second time, it thinks "maybe this time!". By the fourteenth, it's thinking "when can I go to sleep?". Communicating what's changed from pull to pull can help keep people alert, as can breaks and distractions such as a trash clear. If you wiped to something stupid, that can surprisingly wake people up a little, though it can also simply annoy them (repairs don't pay themselves). Remind people of better pulls to beat, and try to assess the mood of the raid.
Your guild might be familiar with "famous last tries". For some reason, when it's the last pull of the night and everyone can go home afterwards, suddenly people remember how to play. Phases are executed flawlessly, DPS is on track and everything clicks. It might be your best try of the night, or it might even be that fantastic first kill -- but don't underestimate the power of the raid's mood as it suddenly lightens when you utter the words "famous last pull".
When you finally get that kill, take a few minutes to think about what made the difference between the kill and all the wipes preceding it. Was it a minor change that had far-reaching effects? Was the RNG in your favour? Perhaps people just stopped sucking and finally played their roles perfectly. Give credit where credit's due, to the person who suggested the change, to the player pulling off a timely combat rez, to the tank that picked up an add when another tank died. Most importantly, remember what you did for next time!