Having an erection when you hug and kiss is normal and in itself should not be a problem. If, however, you have what is called "premature ejaculation", then you might try a low doze of an SSRI-drug. They make it more difficult to ejaculate. I cannot promise that this will help you, just that it might help you, and may be worth trying if you cannot accept it the way it is.
Of course, you should not try any drug without discussing it with a doctor, in the case of SSRI-drugs preferably a psychiatrist, as they know most about psychiatric drugs.