It seems from your queries that you av an oily skin type.
An oily skin an scalp are very comman causes of pimples on the Forehead.
Plz avoid overnight oil application if your doing so. Just apply it for half an hour before washing hair.
Use anti-dandruff shampoos containing ketoconazole for washing your hair twice a week.maintain yourself on once a week later.
Don not use heavy conditioners or gels on the scalp. Keep them away from the scalp.
Please see a dermatologist who can prescribe you certain oral medications for the dandruff and acne.