Sonnet 146 most connects with "Macbeth" if you study it specifically in comparison to Macbeth's "Tomorrow and tomorrow and tomorrow" soliloquy in Act Five. The sonnet is concerned with the question of why do we concern ourselves so much with outward appearance during life, when after life our outer shell will just be a corpse in the ground. Shakespeare writes: "Why dost thou pine within and suffer dearth/Painting thy outward walls so costly gay?/Why so large cost, having so short a lease,/Dost thou upon thy fading mansion spend?" The speaker of the sonnet argues that, when life is so short, why should we spend our time "pining within" and "suffering" to keep up our looks.
This connects to the ideas in Macbeth's "Tomorrow" soliloquy, where he observes that "Life is but a walking shadow . . . a poor player who struts and frest his hour upon the stage and is heard no more." Macbeth is contemplating the meaning of life, basically asking why we try to acheive any meaningful existence when we will all meet the same end in death. Clearly both pieces reflect Shakespeare's existential side.