Hey - when you do get to the doc, can you post what the doc says here so people who read this know what happened? I know you posted in your other thread that you're sick, so won't get to the doc til next week, so feel better!
Where I live, there are urgent cares too. You can consider that but your primary care doctor would be the best to start off (urgent care if you don't have one). Do NOT be embarrassed as seriously, doctors hear, see and touch all sorts of things exactly like this regularly. They are immune to it and don't see it like we do as it is just part of their job. This has been going on for three years?
You don't need to see a urologist - any doctor would help.
You could have a prostate infection, which can cause the tip of your penis to be really irritated, and cause painful erections. You absolutely need to see a doctor for that. It can be caused by an STD, but isn't always. Even though you're 18, you can still have that.
I'm sorry you've lived with this for so long, but it won't help to wait any longer. To a doctor, your penis is just another body part, like your elbow or ear.
There could be other things wrong, too, but you really, really need to see a doctor. Don't let shame or embarrassment keep you from getting this checked. I doubt it's from your sleep position, though I suppose it could be. You just really need to see a doctor. Let us know what happens.
Let me just add to that Im 18 and this pain hasnt died down for the best part of 3 years and im embarressed to tell anyone irl. Ive stopped masterbating as it only adds to the pain, mostblikely got these from masterbating.