Hello,
You should see a urologist. In the meantime, once the swelling resolves you will need to do a better job of cleaning the glans (tip) of the penis. That yellow/white substance you describe is called smegma, a build up of dead skin and debris.
Best regards,
Dr. Downing
Try cleansing your penis more often and be sure to remove all soap residue. You might try using an antibiotic ointment such as Bacitracin or Triple Antibiotic to reduce the infection. Hydrocotrisone might help in relieving the itch. Check with your dr first before starting any home treatment. You need to find the root cause of your problem