warns that
losing self-control or forgetting what is appropriate to one's circumstances can lead to foolish behaviour.
Imagine a case where i you behave in a silly or embarrassing way, you are a fool,; then “He is a fool that forgets himself” fits well.