The word संशयात्मा does not literally mean doubting mind. But it has an inner meaning. Samshayatma means a cynic who does not agree with the scriptures.
If we consider only shloka you are quoting, there may be some misinterpretations and doubts. Therefore, we should also consider the shlokas which precede the 40th shloka.
śraddhāvāllabhate jñānaṃ tatparaḥ saṃyatendriyaḥ |
jñānaṃ labdhvā parāṃ śāntim acireṇādhigacchati || 39 ||
One who has faith, who is dedicated to it, and who has controlled the senses, attains
enlightenment. Having attained enlightenment, one obtains Supreme Peace.
Now coming to the shloka you have quoted,
ajñāś-cāśraddhānaśca saṃśayātmā vinaśyati |
nāyaṃ loko’sti na paro na sukhaṃ saṃśayātmanaḥ|| 40 ||
The ignorant, the faithless and the cynic perish; for the cynic there is neither this world, nor that beyond, nor happiness.
This shloka is explained by Shri Ramanujacharya as follows:
'The ignorant' is one that has not received knowledge through instruction, 'the faithless' is one who does not develop any faith in this teaching i.e., who does not strive for immediate improvement, and the cynic is one who is full of skepticism in regard to the teaching — such persons perish, they are lost. When this teaching about the real nature of the Self is treated with skepticism, then one fails in this material world as also the spiritual world. The meaning is that the goals of human endeavor, such as
Dharma (right living), Artha (prosperity) and Kāma (pleasure) which constitute the material goals or aims of life [in this world], are not fully achieved by such a cynic. How then can the Supreme Goal — Moksha (liberation) be achieved by him? For all the goals of life can be achieved by doing the works which are prescribed by the Shastras, but their correct performance requires the firm conviction that the Self is different from the body. Therefore, even a little happiness cannot be achieved by one who has doubts concerning the true nature of the Self.
We should be asking less and less questions? How will we learn if we don't ask questions?
No asking questions does not make you samshayatma and ignorant. It is the way of learning what you don't know. Krishna classifies devotees into four classes in Bhagavat Gita 7.16.
catur-vidhā bhajante māṃ janāḥ sukṛtino’rjuna |
ārto jijñāsur arthārthī jñānī ca bharatarṣabha || 16 ||
Four types of benefactors worship Me, O Arjuna (Bull of the Bharatas). These are the distressed, the seekers after knowledge, the ambitious, and the wise.
- Arta (the distressed) Example: Gajendra, draupadi
- Artharti (Devotees with certain wishes or ambitious) Example: Dhruva
- Jigyasu (Knowledge Seeker) Example: Arjuna
- jñānī (self realised) Example : Hanuman.
Knowledge seeking is not as same as cynical or doubt minded. Having faith on the knowledge and not questioning the authority of the scriptures is what Shri Krishna is saying.
Also seeking knowledge in a prescribed manner (from authorized sources) is also important.