The woman is upper-class British, stranded I believe somewhere in the Middle East late 19th century or so (she's waiting for an often-cancelled train). While stuck there alone, she starts to realize that her husband was madly in love with a friend of theirs; her children have rejected her, and so on. At the end, as she finally travels back into more hospitable Europe, she decides she was fantasizing and none of that could be true.
I read this 25 years ago, but my impression was that it was written by a British author during or shortly after the time-period in the book.