Yes, the sound you are referring to is called humming.
The on-line Oxford Dictionary has two definitions for 'hum' as a noun.
1/ A low, steady continuous sound. 2/ Used to express hesitation or dissent. Oxford - Hum
This second definition fits well with your 'the sound you make when you're thinking'. This definition is also related to the phrase 'to hum and haw' (sometimes written as 'to hem and haw'), which means that someone is being indecisive. This phrase relates to the sounds 'mmm' and 'awww' that people sometimes make when they are in deep thought about something. The phrase has moved beyond these sounds and is more commonly used for the process of discussing a decision in depth to avoid having to come to a decision.
The main difference between the sound we make when we are thinking and the sound we make when humming a song is that when we hum a song we frequently change the pitch and volume of our hum to match that of the song or music. When we hum as we are thinking we usually maintain an almost constant pitch and volume.