There are three strategies (that I know of) for dealing with pain and suffering. The first is dualist. You can go low and say to yourself, “It could be worse than this.” Or you can go high and chase pleasures until all your dopamine is spent (and the pain will probably resurface in the end).
The second is Buddhist, say to yourself, “This is this.” Look at the pain and say, who are you? How do you make me feel? And realize that the feeling of pain is no different from the feeling of pleasure, objectively.
The third is logotherapeutic. Frankl would say to find meaning in the pain and suffering, like he did while working as a slave laborer at Kaufering. He would say, life has meaning under all circumstances, even when you’re suffering.