I am not sure how much of it is autobiographical. It is a story told with empathy, interspersed with philosophical outlook of Maugham which is bound to strike you.
His prolixity on Mildred may seem to be a bit contrived and ending with romantic culmination with Sally sound a bit of happy ending, the underlying conflicts in the emotional state of Philip is sure to leave a lasting impression.
Memorable read.