Even though "On My First Son" is mostly about death and sadness, it still manages to find a way to talk about art. (And no, we don't mean that the speaker's son is called Art.) The speaker likens his child to a work of art, while also meditating on the ways in which art can help one deal with death. Through the poem, the speaker is able to keep his son "alive"—he doesn't mention his death right away—and, by comparing his son to a work of art, he suggests that his son will live for a very long time (like many works of art).
The speaker suggests that creating art (in this case, poetry) and creating children are one in the same process. A child must be shaped, formed, and developed, just like a poem, or an essay, or that awesome Play-Doh bust of Shakespeare we made last holiday season.
Art itself—in this case the poem—functions as the speaker's consolation. It's the ultimate shoulder to cry on. He can only "work through" his son's grief by writing about it.