FDG, the question on the visa waiver form is something like 'do you have, or have you had, a mental illness that has or could have caused injury to yourself or others?' I've included details below. I've always ticked no--the question is open to interpretation. I think the connection with being sectioned is that, by definition, you were considered to be a danger to yourself. However, I've never been asked about this on entry to the US and they can't access your medical records to check. (They can do this for Canadians.) I always carry a letter from my pdoc stating that my condition is controlled and I am stable.
If you tick 'yes', you have to apply for a visa, which requires you to go down to the US embassy and be interviewed.
Physical or Mental Disorders
With regard to physical or mental disorders, answer 'Yes' to this question if:
(a) You currently have a physical or mental disorder and a history of behavior associated with the disorder that may pose or has posed a threat to your property, safety or welfare or that of others; or
(b) You had a physical or mental disorder and a history of behavior associated with the disorder that has posed a threat to your property, safety or welfare or that of others and the behavior is likely to recur or lead to other harmful behavior.
Answer 'No' if:
(a) You currently have no physical or mental disorders; or
(b) You have or had a physical or mental disorder without associated behavior that may pose or has posed a threat to your property, safety or welfare of that of others; or
(c) You currently have a physical or mental disorder with associated behavior, but that behavior has not posed, does not currently pose nor will pose a threat to your property, safety or welfare or that of others; or
(d) You had a physical or mental disorder with associated behavior that posed a threat to your property, safety or welfare or that of others, but that behavior is unlikely to recur.
From the US Embassy website:
"Travellers with mental illnesses can travel visa free under the Visa Waiver Program provided that their condition does not render them a danger to themselves or others. They may wish to carry letter from their doctor to that effect to facilitate their entry into the United States."