“When you do anything from a clear judgment that it ought to be done, never shrink from being seen to do it, even though the world should misunderstand it; for if you are not acting rightly, shun the action itself; if you are, why fear those who wrongly censure you?”
Epictetus wrote this in The Enchiridion, first published in 125. It appears in Chapter XXXV. The English is Thomas Wentworth Higginson’s translation from the Ancient Greek.