In Torah Ohr it’s explained that the Flood wasn’t just a punishment but also a cleansing for the world.
The Flood lasted 40 days, which correspond to the 40 sea (measurements) of the mikva. That’s why the Flood is called “Noah’s Waters” or a “calming of the spirit”.
The Torah Ohr further explains that this concept applies to the worries accompanying the drive to make a living. These worries are called Mayim Rabbim or Great Waters and they wash away the undesirable in a person and lead to a “calming of the spirit”.
2. The connection between all these concepts is as follows: The inner meaning of the mikva is “bitul” or self-nullification and self non-perception. The word “tvila” – dipping, has the same letters as the word “ha-bitul”, i.e. self-nullification and self non-perception. This means that when a person takes leave of his “I”, this leads to elevation and the person becomes a vessel for holiness.
And this is the real meaning of why a person is sent worries and preoccupation over his livelihood (which temporarily vex him), this is in order that something has to “snap” within the person to allow him to leave the boundaries of his ego and to become a vessel for holiness.
3. Thus the real intent is not to punish, G-d forbid, but to cleanse from all that’s evil. This can take place inside of a minute of time and if a person, within that minute, will grasp the inner meaning of this and will fulfill that which is necessary, he will then remove himself from that which is evil and will arrive at a calming in both material and spiritual senses.
From the Sicha of Parshas Breishis 5713 (1952)