“My heart has rejoiced in the Lord” (1 Sam 2:1). When Anna says “my heart,” she surely is speaking of her mind’s freedom. Wicked people do not possess their own hearts; the devil does. That’s what is said of the betrayer: “The devil had now put into the heart of Judas Iscariot, the son of Simon, to betray him” (Jn 13:2). If Judas, and not the devil, had possessed his own heart, he would have put something good into his heart rather than the evil the devil put there….
Whenever we seriously sin, we no longer possess our own hearts. That’s why Jeremias criticized the Jewish people for their serious sin: “Hear this, foolish people, who do not have your hearts” (Jer 5:21); it’s why another prophet confessed to God, “Your servant has found his heart” (2 Sam 7:27). That is why Anna said: “My heart has rejoiced in the Lord” (1 Sam 2:1), describing the freedom of mind without which she could not worthily praise God. (Gregory I, On First Kings, Book II, ch. 1, 2; PL 79, 77)