If you have received the impression of any pleasure, guard yourself against being carried away by it; but let the thing wait for you, and allow yourself a certain delay on your own part. Then think of both times, of the time when you will enjoy the pleasure, and of the time after the enjoyment of the pleasure when you will repent and will reproach yourself. And set against these things how you will rejoice if you have abstained from the pleasure, and how you will commend yourself. But if it seem to you seasonable to undertake (do) the thing, take care that the charm of it, and the pleasure, and the attraction of it shall not conquer you: but set on the other side the consideration how much better it is to be conscious that you have gained this victory.
As with a lot of Stoicism, the basis of this peice of advice is to eek out some space between action and reaction. When you are considering something that gives you pleasure, take a moment to think through how you will feel if you do or don't go through with persuing it. Is it a short-lived pleasure that you will regret? Could you get more pleasure from the satisfaction of self control?
Note that Epictetus does not say that you should always avoid pleasure; just that you should not rush into it blindly. And if you do decide to go ahead, remain aware of its influence over you.