Bless oneself in the heart
Here’s what it means
To assure oneself that everything will be well despite deliberate disobedience.
Why the Bible says it this way
The person privately pronounces peace over himself while ignoring the covenant warning.
An idiom is a familiar phrase whose meaning comes from the whole expression, not from reading each word by itself.