1to divert oneself from (loneliness, grief etc)
2to dispel (negative thoughts etc)
Example
tāng汤mǔ姆shī失yè业hòu后,wèi为le了pái qiǎn排遣yù郁mèn闷de的xīn qíng心情ér而kāi开shǐ始le了dǔ赌bó博。
汤姆失业后,为了排遣郁闷的心情而开始了赌博。
After Tom lost his job, he started to gamble to cope with his depression.