The number 40 has a powerful significance in many spiritual traditions and in many cultures. In general the number 40 represents a state of purification, or “decantation”, where there is a clear separation between substances, i.e the lower vibration ones and the higher vibration ones.
In traditional alchemy, there is a mention to the 40 philosophical days as a recommended period of purification, purging and refinement of the senses preceding any transmutation work.
In the Christian tradition, Lent is the period of the liturgical year from Ash Wednesday to Easter. The traditional purpose of Lent is the preparation of the believer – through prayer, repentance, almsgiving and self-denial – for the annual commemoration during the Holy Week of the Death and Resurrection of Jesus, which recalls the events linked to the Passion of Christ and culminates in Easter, the celebration of the Resurrection of Jesus Christ.
The Bible itself is filled with passages that mention the number 40 as a benchmark of deep transformation. The 40 days of the flood, the forty days that Moses and Elijah spent on the mountains, the 40 years of pilgrimage from the Israelites in the desert, and also the forty days master Jesus spent on prayers and fasting before he started his public mission. In addition, let us not forget the 400 years of the permanence of the Israelites in Egypt. In the Holy Bible, the number 4 symbolizes the material Universe and the zeros that follow the number are significant to represent the time in our lives, the challenges and difficulties that must be overcome.
In every sacred reading from ancient traditions, we see the mentioning of the 40 days as precursors in creating a favorable environment for change and the deep preparation of the heart through purging of the old and of obstacles in order to receive a new set of instructions and preparation for a new phase in life. So the 40 days of Lent is also linked with the Babylonian goddess Ashtoreth/ Astarte/Ishtar (the origin of the word Easter), and the worship of Tammuz. Unlike Lent and the fasting tradition that was not necessarily explicit in the scriptures, both of these references to Tammuz and the worship of the Sun can be found in scripture.
"Originally, even in Rome, Lent, with the preceding revelries of the Carnival, was entirely unknown; and even when fasting before the Christian Pasch was held to be necessary, it was by slow steps that, in this respect, it came to conform to the ritual of Paganism. What may have been the period of fasting in the Roman Church before the sitting of the Nicene Council does not very clearly appear, but for a considerable period after that Council, we have distinct evidence that it did not exceed three weeks. The words of Socrates, writing on this very subject, about A.D. 450, are these: 'Those who inhabit the princely city of Rome fast together before Easter three weeks, excepting the Saturday and Lord's day.' But at last, when the worship of Astarte was rising into the ascendant, steps were taken to get the whole Chaldean Lent of six weeks, or forty days, made imperative on all within the Roman empire of the West. The way was prepared for this by a Council held at Aurelia in the time of Hormisdas, Bishop of Rome [514-523], about the year 519, which decreed that Lent should be solemnly kept before Easter. It was with the view, no doubt, of carrying out this decree that the calendar was, a few days after, readjusted by Dionysius."
"Legend has it that Tammuz was killed by a wild boar when he was forty years old. Hislop points out those forty days--a day for each year Tammuz had lived on earth -- were set aside to "weep for Tammuz." In olden times these forty days were observed with weeping, fasting, and self-chastisement -- to gain anew his favor -- so he would come forth from the underworld and cause spring to begin. This observance was known not only at Babylon, but also among the Phoenicians, Egyptians, Mexicans, and, for a time, even among the Israelites."
In the Hindu tradition, the word Chalisa means "forty verse" prayer. It is derived from the Hindi word "chalis" which means 40. In a Chalisa, the acts and deeds od deities are recalled in these verses to aid the devotee to meditate on righteous and noble qualities.
 It rained 40 days and nights: Gen 7:4, 12.
Forty days after sighting the tops of the mountains, Noah set forth a raven and a dove: Gen 8:6-7.
Joseph mourned the death of his father Jacob for a period of 40 days: Gen 49:33 - Gen 50:3.
Moses on Sinai for 40 days: Exo 24:18, 34:28, Deu 9:9-11.
Moses pleads for Israel 40 days on Sinai: Deu 9:18-25, 10:10.
Canaan spied on for 40 days: Num 13:25, 14:34.
Goliath taunted Israel for 40 days: 1 Sam 17:16.
Elijah fasted and journeyed to Horeb for 40 days: 1 Kings 19:8.
Ezekiel bore the iniquity of Judah for 40 days: Eze 4:6.
Jonah warned Nineveh of judgment in 40 days: Jonah 3:4.
Jesus fasted in the wilderness for 40 days: Matt 4:2, Mark 1:13, Luke 4:2.
Jesus was seen for 40 days after His crucifixion: Acts 1:3.
 The weeping of Tammuz is connected with pagan sun worship. Note that Lent is a moveable observance, connected to and preceding the festival of Easter. Easter is celebrated on a day specified only by the Roman Catholic Church, and not the Bible, and is fixed based on the sun and the Spring or Vernal equinox.
 Ezek 8:14 Then he brought me to the door of the gate of the LORD'S house which was toward the north; and, behold, there sat women weeping for Tammuz.
Ezek 8:16 And he brought me into the inner court of the LORD'S house, and, behold, at the door of the temple of the LORD, between the porch and the altar, were about five and twenty men, with their backs toward the temple of the LORD, and their faces toward the east; and they worshipped the sun toward the east.
2 Ki 23:13 And the high places that were before Jerusalem, which were on the right hand of the mount of corruption, which Solomon the king of Israel had built for Ashtoreth the abomination of the Zidonians, and for Chemosh the abomination of the Moabites, and for Milcom the abomination of the children of Ammon, did the king defile.
 Source: The Two Babylons, by Alexander Hislop, second American edition, 1959, published in America by Loizeaux Brothers, pages 106, 107. And Babylon Mystery Religion, by Ralph Edward Woodrow, Copyright 1966, 1992 printing, page 139.