For a three-act plot analysis, put on your screenwriter’s hat. Moviemakers know the formula well: at the end of Act One, the main character is drawn in completely to a conflict. During Act Two, she is farthest away from her goals. At the end of Act Three, the story is resolved.
Act I
Act I encompasses Doug's awareness that he's alive, beginning of the notebook, and the construction and (self-)destruction of the Happiness Machine. It concludes at the end of Chapter 16, with Doug and Tom discussing the fact that adults never really were children and that there's no help for those ancient lumps of flesh whatsoever.
Act II
Act II spans chapters 17 through 37. It's all death all the time in Green Town, with Elizabeth Ramsell falling prey to the Lonely One and Doug almost falling prey to his own terror of mortality. If not for Mr. Jonas's magical home bottling company and Lavinia Nebbs's mad ninja skillz with a pair of sewing scissors, things might just go completely off the rails. ("Off the rails?" See what we did with the trolley reference there?)
Act III
Chapters 38 through 40 comprise Act III, and together they create the happy ending we've been hoping exists. Doug saves Grandma's cooking, pays Mr. Jonas's kindness forward, and the Spaulding family (minus Great-grandma) lives to see another summer.