In thinking of baptism and receiving the Holy Spirit you may want to consider the following:
Ezk 36:25-28
I will sprinkle clean water upon you, and you shall be clean from all your uncleannesses, and from all your idols I will cleanse you. A new heart I will give you, and a new spirit I will put within you; and I will remove from your body the heart of stone and give you a heart of flesh. I will put my spirit within you, and make you follow my statutes and be careful to observe my ordinances. Then you shall live in the land that I gave to your ancestors; and you shall be my people, and I will be your God.
Compare this to ACTS 2:37-38
Now when they heard this, they were cut to the heart and said to Peter and to the other apostles, “Brothers, what should we do?” Peter said to them, "Repent, and be baptized every one of you in the name of Jesus Christ so that your sins may be forgiven; and you will receive the gift of the Holy Spirit.
Going statement for statement we see an unmistakable pattern and prefiguring in Ezekiel and it is clear that God will use water to cleanse us (forgive our sins), that he will change our hearts (and they were cut to the heart), and that he will put a new spirit within us(we receive the gift of the Holy Spirit.) Beyond this we read the following NT scriptures.
Matthew 3:15-17
But Jesus answered him, “Let it be so now; for thus it is fitting for us to fulfil all righteousness.” Then he consented. And when Jesus was baptized, he went up immediately from the water, and behold, the heavens were opened and he saw the Spirit of God descending like a dove, and alighting on him; and lo, a voice from heaven, saying, “This is my beloved Son, with whom I am well pleased.”
In this passage we see Jesus receiving baptism. Obviously, Jesus did not need baptism as we do. Nevertheless, Jesus is baptized for two reasons. One is to “fulfil all righteousness” This makes holy and efficacious baptism for all Christians of all times. Secondly we see that Jesus receives the Holy Spirit. Thus we are shown what takes place for us in baptism. We receive the Holy Spirit and we become adopted sons and daughters and we are made pleasing to God. That is we are made righteous before the Lord.
I will let the following passage serve as further testimony but without additional comment because they stand in support with no need of explanation:
ACTS 19:1-7
While Apollos was at Corinth, Paul passed through the upper country and came to Ephesus. There he found some disciples. And he said to them, “Did you receive the Holy Spirit when you believed?” And they said, “No, we have never even heard that there is a Holy Spirit.” And he said, “Into what then were you baptized?” They said, “Into John’s baptism.” And Paul said, “John baptized with the baptism of repentance, telling the people to believe in the one who was to come after him, that is, Jesus.” On hearing this, they were baptized in the name of the Lord Jesus. And when Paul had laid his hands upon them, the Holy Spirit came on them; and they spoke with tongues and prophesied. There were about twelve of them in all.
I hope this helps.