This was a moment a long time coming, and as one would expect, the writers take their time bringing it to fruition. After all, they've been hinting at it for more than two seasons. This is the episode where the Brothers Winchester come to blows as Sam takes one huge step towards the Dark Side. The result is one of the best episodes of the season (and most heart-wrenching, to say the least).
I can't say that I'm particularly pleased with the way that the final swing happened. Sam's choice to drink Ruby's demon blood was initially his own, despite her urging and manipulations, so at least it was another example of his conscious choice to use something evil for something good. (At least, that was and is his stated intention. We all know how the saying goes.)
This latest turn, making the demon blood like a drug and highly addictive, takes away some of that agency. Now Sam is "under the influence". Had he become a bit twisted with the rush of power, and had that power never truly waned, it would have been a logical extension of the corruption of power. Making it a physical need, complete with withdrawal symptoms, implies that Sam is no longer capable of mastering his desires.
Of course, this does facilitate an eventual recovery, because if Sam is largely under the control of an external, altering substance, then there's always the possibility of a cure. Bobby may not have found it yet, but that doesn't mean it doesnÃ¢â¬â¢t exist. Had Sam's attainment of power been completely driven by self-awareness, it would be hard to argue that some future recovery was entirely successful.
In terms of an eventual cure, the solution could be standing right in plain sight. After all, Dean was pulled out of Hell because he started this mess, and it was decided that he was the right one to finish it. But Castiel and others have often implied that Dean was also meant to handle Sam. The implication is clear, now that Castiel released Sam so he could get one final and damning power-up.
Sam is meant to take down Lilith, as Lilith herself already mentioned, and he needs to be as close to the Antichrist Superstar as it gets when that happens, then as soon as Lilith is defeated and Lucifer's rise is halted, Sam becomes the most potent threat in the demonic horde. Because so far, as Ruby mentioned back in the early days of the third season, Lilith was Sam's main challenger for command.
If one can apply logic to the situation, the angelic plan is fairly simple. They try to stop Lilith, but knowing that failure is a good possibility, they set the stage so Sam is compelled by events to gain more and more power to stop her himself. They let Dean get to the point where he has nowhere else to turn, and he accepts his role as their servant. Then they let Sam take down Lilith, ending the threat, and then undercut any possibility of someone quickly taking her place by giving Dean the means to take down Sam.
This points to the easiest solution to the whole mess. The angels may give Dean the power to kill Sam, but it would be his choice to use it in that manner. The key is what Castiel made Dean swear: that he would obey God and his angels as fervently as he would his own father. Dean's expression just about said it all: recent experience has left him with little desire to honor his father. Castiel must have known that, under the circumstances, and that implies that Dean could use whatever he will be given to save Sam rather than kill him.
That still wouldn't repair the damage done to their relationship in this episode. It would only serve the short-term goal of keeping Sam alive (which, logically, is going to happen). In the long term, there are a lot of issues that would need to be addressed. Knowing that the fifth season is already on the schedule is therefore something of a comfort.