How can I tell the difference between the difficulties of life and spiritual attacks?
In the Lord's Prayer we ask "And lead us not into temptation, but deliver us from evil." The Greek of the New Testament used in the liturgy of the Mass in the Greek Church says "the Evil One," making the petition specifically against the attacks of demons. Thus we know that there is such a thing as attacks of the devil, and they must be fairly common, since Our Lord taught us to pray against them in the perfect and oft-repeated prayer of the Our Father.
It is not easy to tell which trials come from the devil and which from our own flesh or from the world. This is because ordinarily the devil does not tempt us in a notably different way from our other sources of temptation. He simply works on the contents of our memory and imagination and our emotions, just as visible, human persons can do. Granted, the devil can see our imagination, so he can be more accurate and personal in tempting us, but he has to work with what is already in us and around us.
When we are assailed by troubling thoughts, and they are persistent, and there is a great tendency to discouragement or anger, then we can be pretty sure that the devil is attacking us. This is not an unusual thing; rather, it is a daily reality for Christians, so there is no reason to fixate on it or become overly frightened. We simply make use of prayer, uniting ourselves to the Divine Will, which alone can use the evil attacks of the devil for our spiritual good.
This is why control over our unruly imaginations and thoughts is so essential as the daily struggle of Christians. They are the battlefield in our struggle against the Evil One. Pray to Our Lady, to St. Michael, and to the great saints, such as St. Anthony of Egypt or Padre Pio, who endured hard trials from the devil. "Be watchful, pray constantly" the Savior tells us, and he knew what it was to be tried by the Evil One.