Distracting oneself with

()(まぎ)らす means deliberately focusing on something else to get temporary relief from worry, sadness, loneliness, or anxiety. English equivalents include “take one’s mind off things” and “distract oneself”.

Literal Meaning

This expression literally translates as “to scatter or mix up one’s spirit”. The word () represents one’s spirit, mind, or feelings, while (まぎ)らす means to confuse, mix up, or divert.

Usage Notes

Someone might listen to music, take a walk, or talk to a friend to avoid dwelling on a problem. Unlike ()(), which is involuntary, ()(まぎ)らす is deliberate.

Examples

Reading a book to distract from waiting for a text message with 気を紛らす

Learn the meaning and usage of the idiom 気を紛らす in Japanese, with examples from manga.
ブラザー・トラップ » Volume 1 » Page 92

Akari is expecting a text message from Izumi. Unknown to her, Izumi’s response was getting too long, so he switched to his computer to write up an e-mail instead.

Narration:
和泉(いずみ)からの返信(へんしん)()ない」
“I haven't received a reply from Izumi.”
あかり:
(たの)しみにしてた新刊(しんかん)()んで()(まぎ)らわそう!」
“I'll distract myself by reading the new book I've been looking forward to!”
没頭(ぼっとう)してたらいつのまにか返信(へんしん)()てたりするかもね!」
“Maybe if I get really absorbed in it, the reply will show up before I know it!”