Yes, the first half is madness, the second, sorrow. The "Mary is the devil" part takes it over the top as that's his wife's name and, as well, as their son was enrolled in a Catholic school, of course it is also the name of the Blessed Virgin.
He is not saying "Mary is the devil." I hear him saying "Mary, he is the devil" to which the wife responds "he is not the devil". Presumably he thinks his son is the devil.