Wherever the Torah refers to thinking and feelings of Anger, compassion, etc. it always mentions the Heart as the controlling organ (also Kidney) but NEVER the Brain?
(Even in the Gemara the Moach is rarely mentioned).
There is actually an argument in the Midrash with relevant psukim where a person's חכמה resides. See ילקוט שמעוני right at the begining of משלי. Siman תתקכט.
There is an argument there between Rabi Eliazar who said it's in one's head and Rabi Yehoshua who says it's in one's heart. The Midrash brings Psukim to show that David Hamelech and Shlomo Hamelech had this same argument, with David saying chochma is in the head and Shlomo saying Chochma is in the heart. The Zayis Raanan there (from the author of Magen Avraham on shulchan aruch orach chaim) points out a difficulty and says David Hamelech held the main chachma is in one's head, but there is some in the heart.
There is further discussion concerning this subject found in the משך חכמה פ׳ בא י׳ב כ׳א. He quotes the midrash and attempts to resolve the dispute by saying feelings such as revenge, resolve, haughty,anger and fear, are all in one's heart, citing psukim as proof. However, logical thoughts such as formations, comparisons,memory are in the head, citing as proof the gemara in shabbos 71 which calls the head the king of all the body parts. He has a long discussion there based on this premise.
The word מוח only turns up once in Tanakh anyway (Job 21:24). It means "marrow". Onkelos translates קדקוד in Deut 28:35 as מוח, and we see it with a similar meaning ("brain", and the membrane around the brain) in the early rabbinic literature. The fact that it's not mentioned in the Tanakh can be due to their either having a different word for the same thing, or to the fact that it's a part of the body that they never speak about. Either way, they did not consider it the seat of thought.
The first person in recorded history to recognise the brain as the source of thought and understanding was Alcmaeon of Croton, a Greek philosopher and physician who lived in the 5th century BCE.
In reality, I personally don't think that this is a question at all: everyone from the Torah's time period believed in the heart as the source of emotions, so this is how the Torah was written. However, I'm happy to provide a source to this effect.
This issue has indeed been noticed by many people, among them R. Shlomo Fisher, who many would consider to be among the generation's foremost Torah scholars, especially in matters pertaining to theology. He brings up this question in his major work, Beis Yishai (Drashos, pg. 361 n. 4).
First of all, just to help a bit, he says that the Gemara does hint to the fact that the brain was the seat of thought, in Yevamos 9a and Menachos 80b, where someone is derided with the phrase 'it appears that he has no brain (מוח just means soft material) in his skull'. He admits, however, that there are many other instances in Shas where it appears that the Sages believed otherwise.
Second, he says that the fact that the Torah never mentions the brain is totally besides the point, as all of the Medieval sages understood that the "the Torah speaks in the language of man", which means, specifically, in the language of the first generation to receive the Torah - and they never knew of the brain's actual function. God first used the Torah to communicate with the generation which received it.
However, he thinks that the fact that the Torah does refer to the heart as the seat of thought/emotion is actually a problem, because the Torah would never promulgate falsehoods, even if they were to have been accepted by everyone in the generation. He then that every prophet received a prophecy that they interpreted according to how they understood the universe. Therefore, even if God may have been giving them a true message, they will interpret it according to their own scientific understanding. Thus, Maimonides insists upon explaining the vision of Ezekiel according to a picture of astronomy that he himself thought to be false, because Ezekiel thought it to be true.
While he doesn't add this caveat, I don't think that R. Shlomo Fisher would say the same thing regarding the prophecy of Moses and the Torah. (Though it would appear that this inaccuracy of referring to the heart as a source for thoughts appears there too) Instead, the second point is probably more accurate: that God gave messages using the common idiom, which was to refer to thoughts as originating in the heart.
In Jewish thought (ha), it's not the brain that thinks, but rather the Neshamah. (See this article from Chabad.)
In Tanakh, dreams appear in association with what occurs in the head (mind). When Jacob dreamed, the angels descended upon and ascended from his head. When Joseph understood the dreams of the cupbearer and baker of Pharaoh, the interpretation had to do with their heads. (His earlier dreams had to do with his own headship among his family and father, Jacob.) When Daniel later interpreted the dreams of Nebuchadnezzar, the meaning had to do with the head of Nebuchadnezzar. Tanakh then appears to correlate the head with the mind in these instances, if we assume a priori that dreams are thoughts.
The Talmud also mentions one instance of the head bearing on dreams in this regard -
“He who in a dream goes into a swamp—it means he will be made head of a session.
“If he goes into a forest, it means he will be made head of those who attend the annual sessions [as mature sages].”
Neusner, Jacob (2011). The Babylonian Talmud: A Translation and Commentary (Vol. 1). Peabody: Hendrickson Publishers, 386.
The Vilna Gaon on Yona says:
Yona 1:5: "And the sailors were afraid, and cried out every man unto his G-d; and they cast forth the wares that were in the ship into the sea, to lighten it unto them. And Yonah went down into the depths of the ship; and he lay, and was fast asleep."
VILNA GAON: And the sailors were afraid - They are the leaders of the body, which is the brain, heart, and the other powers.
Later on he adds:
Yona 1:6 "So the shipmaster came to him, and said unto him: 'Why are you sleeping? arise, call upon your G-d, if so be that G-d will think upon us, that we perish not.'"
VILNA GAON: So the shipmaster came to him He is the head leader (of the body) - the heart.
Later, on Yona 4:11, the Gaon comments:
VILNA GAON: That the two inclinations which advise for the good or for evil, as it says (Kohelet 10:2) "the heart of a wise man is in his right, while the heart of a fool to his left". But the tzadik serves G-d with both, as written "with all your hearts" (Devarim 6:6) which means with both your inclinations,
So it seems thought can arise in the mind but the heart is the one who decides/rules what to do therefore it is considered the real thinker