House of Mirth
(2000)

The only man Lily Bart  (Gillian Anderson) has ever really loved is middle-class lawyer Lawrence Selden (Eric Stoltz), but she doesn't want to lose her place in high society, so she sets her sights on marrying a very rich man.

Unfortunately, all her plots and schemes to snare a rich husband fail, either because she miscalculates or because, deep down, she doesn't really want to marry the kind of wealthy boors who can support the lifestyle she wants.

Her nemesis, Bertha Dorset (Laura Linney) spreads false rumors that Lily is having an affair with her husband George. Lily is then shunned by all polite society and is disinherited by her aunt, from whom she had expected to receive a fortune.  Lily must take a series of jobs that are beneath her, and ends up living in a boarding house.

Lily becomes addicted to the drug chloral, which she needs in order to get any sleep. She overdoses on chloral one night (perhaps by accident, perhaps in a deliberate attempt to commit suicide) and dies. The next morning, Selden arrives to proclaim his love for her... too late.
 

Thanks John L!