Many of the comments here seem to assume that you are only having trouble assessing the pitch of your own voice (along with creating pitches). However, based on your comment it's clear that you are having trouble assessing pitch in general:
I can't think at all about the correct pitches. When I hear a note, I can vary the frequency of my voice until I hear it "resonate" with the note, and then I can hear that I sing the same note. I can sing the same note and also octaves of that note (I also hear them resonate).
This means that you first need to focus directly on training your ear in general, not related to singing. To do this, it is best to rely on objective frequency-based measures and techniques. These do not require a teacher or coach.
Your description of the problem matches exactly with my own experience. If asked to sing a particular note, I was completely lost. If given a played or sung note and asked to match it, I would usually start off completely wrong but could vary the pitch up or down until I heard it match (or "resonate" as you describe). As such, I will recommend the two techniques that helped me most.
Interval training. The most basic exercises for this involve one note being played and then another, with a pause to allow you to identify what interval it is. I used a CD I bought for piano; there are also YouTube videos and similar options. Another is playing a precisely tuned instrument. As above, you want the note frequency to be pretty exact (so be careful if you used a resource based on sung notes — they should be pitch perfect) so that you can objectively assess how you are doing.
You will start out having no idea what the intervals are, but will quickly learn to hear the "color" of the interval — the particular quality of the contrasting notes. One method to help when beginning is to compare what you hear to a known source of the interval. An example for an octave above would be the first two notes of Somewhere over the Rainbow ("Some - where").
Learning the particular sound of one note. This is about learning the particular "color" of one note, that makes (for example) an A an A no matter what octave it is or what instrument is producing it.
I chose A440 and started by having it played on my computer while I tuned the A string on my guitar, until I heard that resonating match you described. I also double checked the guitar against a tuner to ensure that objective frequency match. After a couple days I would play the sound on my computer, pause it, and then try to tune my guitar to match — then play both together and see how far off I was, aiming to improve next time. Then I progressed to tuning without playing the computer sound first, and only checking with the tuner afterward. Eventually, I was getting it right every time and didn't need to check anymore.
If you don't have any access to an instrument, this might be more difficult. There are probably software tools where you could play a random pitch within a narrow range (say 435 Hz - 445 Hz) and vary it manually to do something similar, but I don't know anything offhand. You could do it with your voice as long and you have the ability to record yourself and some software to identify the pitch of what you sing; once again, it should be objective.
These two things combined should allow you to pick any note and "hear" it in your head by figuring out its interval from A, then how that interval sounds, and then focusing on how the second note in the interval (the one you want) sounds. With practice these steps become very quick, and eventually disappear altogether.
When it comes to producing notes with your voice and assessing it, I agree with the others that you want a good coach. But the above should still help as you learn to associate the physical feeling of producing a note with what you hear in your head, and how producing the same notes in different ways still creates the same intervals despite the different timbre and feeling.
I'm still not an amazing singer by any means, but I am massively improved compared to before I did this kind of training. It helped me immensely to be able to immediately identify when I was off-key and by how much, so I hope it will be at least a good start for you. Do also check out the other answers to these posts: