This refers to the scene just before Chllingworth opens Dimmesdale's shirt as he naps and sees ... who knows what. Here's the text:
Then, indeed, Mr. Dimmesdale shuddered, and slightly stirred. After a brief pause, the physician turned away. But with what a wild look of wonder, joy, and horror! With what a ghastly rapture, as it were, too mighty to be expressed only by the eye and features, and therefore bursting forth through the whole ugliness of his figure, and making itself even riotously manifest by the extravagant gestures with which he threw up his arms towards the ceiling, and stamped his foot upon the floor! Had a man seen old Roger Chillingworth, at that moment of his ecstasy, he would have had no need to ask how Satan comports himself when a precious human soul is lost to heaven, and won into his kingdom. But what distinguished the physician's ecstasy from Satan's was the trait of wonder in it!
We would expect that Chillingworth saw the Scarlet Letter on his breast, but it might be the wounds from the flaggelation that Dimmesdale partook of. After all, even at the most telling moment when Dimmesdale bares his breast, there is not agreement about what they saw. Some say they saw the "A," but others claimed that there was nothing. If Chillingworth had seen something, wouldn't everyone? Wouldn't it still be there?
Whatever he saw, his reaction was not sympathy, which would be the human reaction, but glee at a fellow man's suffering ... and this is truly Satanic, no matter what he actually saw.
Ambiguity is one of Hawthorne's best tools, and it is clearly in play here.
Chillingworth, in saying these words, is basically stating that he is shocked at his own obsession with Dimmesdale. He, a man who was once in control of himself, his wife, his career, and his life, is now falling under his own weaknesses and demons. Namely, these weaknesses and demons include jealousy, rancor, the sadistic need to hurt others, a hunger for revenge, and hatred.
It is apparent to the reader, and to Chillingworth himself, that he has never felt these emotions before. Now, they are taking the best of him. This is a huge event for him because, perhaps for the first time in his life, he is allowing emotion to take over common sense. This is what he means when he says: "A strange sympathy betwixt soul and body".
The second part of the exclamation, "were it only for the art's sake..." is a slight allusion to his natural curiosity, as well as his tendency for scientific inquiry: The two most predominant factors in a physician's mind. Hence, this latter phrase is sort of an excuse that Chillingworth tells himself to satisfy his morbid and desperate want of information as to what is "eating" Dimmesdale inside. It is a way of saying: "I am naturally curious so, even if it is for that matter, I must know what is going on."
In Chillingworth, Hester, and Dimmesdale we find nothing but broken people. Each of these characters allowed nature to take over their senses and, for this same reason, they all failed in life. Chillingworth is nothing but a sad example of a good man gone bad.