As you indicate, the last line of the play/poem is meant to emphasize the feeling of catharsis that should be felt by the audience or reader by the end of the work.
In the play/poem, we have seen the building emotion that has led to the catharsis. Samson has gone through an incredible series of emotions, meeting with his father, having to endure Dalila's temptations (and the terrible memories it must have brought), and being subjected to the taunts of Harapha.
After going through all this, he finally feels himself at peace when he decides that he must go to the temple. His destruction of the temple restores his honor and gives him his revenge. This is surely cathartic to him because it allows him to be purged of all the negative emotions he'd had.
The ending line, then, reminds us that our minds (like Samson's, at the end) can now be calm because the emotions that rose throughout the work have been released.