Hello there!!
The integumentary system consists of skin, hair, glands, nails and nerves. Its main function is to act as a barrier and protect the body from outside world. It's main functions are --
=> Protects the body's internal living tissues and organs
=>Protects against invasion by infectious organisms
=>Protects the body from dehydration
=>Protects the body against abrupt changes in temperature
=>Helps dispose of waste materials
=>Acts as a receptor for touch, pressure, pain, heat, and cold
=>Stores water and fat
So, as we see there is almost nothing that the integumentary system is not protecting us against. But it does not protect us from mental pain or problem .i.e. the integumentary system does not protect us from mental anxieties.
Hope it helps you!!
All the Best!!