Herod beheaded John the Baptist, which had a profound impact upon Jesus, who then sought solitude,
When Jesus heard it, He departed from there by boat to a deserted place by Himself. But when the multitudes heard it, they followed Him on foot from the cities. And when Jesus went out He saw a great multitude; and He was moved with compassion for them, and healed their sick (Matthew 14.13–14).
Jesus could have been frustrated, yet, He did not let that happen. Rather He had compassion on the people, and even healed them.
We all need solitude from time to time, but sometimes someone just needs us. Do what you can, and ask God to give you the rest and peace of mind that you need.