Does your apricot tree ooze sap through sunken, dead areas of bark?
Is there a sawdust material (frass) present together with the oozing sap, usually near the bottom of the tree?
Was the winter unusually harsh, or was there any frosts in early spring?
Did you accidentally injured the apricot tree with gardening tools or lawnmower?
Apricots are susceptible to canker. They can suffer from bacterial, and perennial (or valsa) canker. Prune off wilted or dying branches below the infected area. You should sterilize pruning tools in isopropyl alcohol beforehand. Copper sprays help in the control of the disease.
Your apricots are attacked by peachtree borers. These small caterpillars tunnel into growing shoots and fruits and feed on the inside. Prune off the affected fruits and shoots below the entry point and destroy them. If you find holes in larger branches, slide the wire into the hole to kill borders inside.
Your apricot tree suffered from freeze injury. You should protect plants from freeze injury by covering the trunk with drop cloths, or blankets when frost is expected.
Injured trees will sometimes ooze sap from the wounds. Be careful when doing gardening work around trees. If someone else is doing the chores protect your tree by installing a tree guard around the tree trunk. Select a guard large enough to allow the trunk to expand as it grows.
Some environmental issues might have stressed your apricot tree so it started oozing sap. All you can do is to provide it with good watering and fertilizing to remove the stress factor.
https://www.mandycanudigit.com/2019/05/28/why-is-my-apricot-tree-oozing-sap/?doing_wp_cron=1595103552.2363059520721435546875
https://homeguides.sfgate.com/apricot-trees-leaking-sap-dead-branches-28223.html
Ellis, B. W., Bradley, F. M., & Atthowe, H. (1996). The Organic gardener's handbook of natural insect and disease control: a complete problem-solving guide to keeping your garden & yard healthy without chemicals. Emmaus, Pa.: Rodale Press.

Sreten null
Hi! I’m Sreten Filipović. I graduated from the Faculty of Agriculture at the University of Belgrade, with a master's degree in Environmental Protection in Agricultural Systems. I’ve worked as a researcher at Finland's Natural Resources Institute (LUKE) on a project aimed at adapting south-western Finland to drought episodes. I founded a consulting agency in the field of environment and agriculture to help farmers who want to implement the principles of sustainability on their farms. I’m also a founding member of the nonprofit organization Ecogenesis from Belgrade whose main goal is non-formal education on the environment and ecology. In my spare time, I like to write blog posts about sustainability, the environment, animal farming, horticulture, and plant protection. I’ve also published several science-fiction short stories.
You can find me on LinkedIn at https://www.linkedin.com/in/sreten-filipovi%C4%87-515aa5158/