“Good people will do what they find honourable to do, even if it requires hard work; they’ll do it even if it causes them injury; they’ll do it even if it will bring danger. Again, they won’t do what they find base, even if it brings them wealth, pleasure or power. Nothing will deter them from what is honourable, and nothing will lure them into what is base.” Seneca, Moral Letters.
Be clear about what is important to you – your values – and have them front of mind in all that you do. Then you will be ready to remind yourself why it is, exactly, that you are enduring pain and hardship right now. It will also help you to remember what you can lose if you succumb to the temptation of pleasure in the here-and-now at the expense of the future that could be.