The subject of free will comes up often in discussion of philosophy of mind. Strict determinists hold that since all effects have a cause, there is no free will. Mind-body dualists insist that choices occur out of a magic vacuum, and decisions are not determined by anything.
Both are wrong.
Free will is what happens when our choices are made for reasons. Free will is circumvented when external causes trump our reasons. Reasons are derived from reason itself--that is, we do what we do because there is a chain of reasoning that leads to that outcome. Causes trump that chain of reasoning. We are constrained by circumstance, are driven temporarily mad, or our chain of reasoning is derailed by events beyond our control.
By analogy, when a computer fails due to hardware malfunction, we do not hold the program 'responsible' for the crash. A defective hard drive can cause a crash, in which case we do not blame the logic of the program. The program is sound, it is the hardware that is to blame. But if the system is functioning properly, then the program is defective, and we disdain the shoddy construction of the program. We expect the program to deal with bad data, poor input, and the like. But if the machine is compromised, all bets are off.
So, an individual is responsible for reactions to situations, even extreme ones. But genuine brain malfunctions--schizophrenia, manic-depression, or drugging not deliberately incurred by the individual--are all causes beyond control, and responsibility may be waived. But any bizarre and irrational act will be met with the indignant query, "What were you thinking?" This is why black-box AI is not sufficient for proof of intelligence. The Turing test fails, because as fellow intelligences, we demand access at the debug level. We demand internal access to figure out what went wrong--and the AI had damn well better deliver. If you do something stupid, you had better have a damn good reason.
Reasons operate at the level of abstraction of consciousness, the software level. Causes are physical determinants that override our reasons. Reasons are software logic, while causes are hardware flaws. So long as there are no causes that prevent us from arriving at decisions based upon the level of abstraction at which conscious choice operates, we have chosen freely, and are entirely responsible for our actions. But we are also responsible for those actions which are the consequences of causes we inflict upon ourselves. You cannot beg for pardon for actions taken under the effects of drugs that you took voluntarily--these are causes inflicted for your own reasons.
There is no magic vacuum. If your decisions were not dependant upon reasons, then you would be acting randomly, and would be insane. Sane decisions rely upon cognitive determinants--reasons--which are not at all the same as physical determinants--causes. Indeterminacy has no part in free will. A free rational being can trace his or her decisions to a set of beliefs, a logical chain, and an outcome. Indeterminacy is a red herring. The critical factor is the level of abstraction.
So, as long as your mind is not addled by factors not within your control, you are responsible for your actions. But note that claiming that events drove you to do what you did will, if what you did was morally reprehensible, encourage the judge and jury to find you habitually morally deficient, and therefore justify a long sentence for the protection of society. The nature of the situation will not excuse morally deficient actions. Only temporary insanity, provoked by other (involuntary) causes, will secure clemency. And these are, of course, out of your control.
In short, there is no deliberate excuse for bad behaviour. Determinism makes you even more responsible than traditional doctrines of free will.