It was the summer of 2005 and I was lost.

The investors in my game technology company had hired a new CEO. I’d poured everything into the John Kerry for President campaign and came up with a loss. The consolation prize was a state government appointment to director of technology-based economic development in Charleston, a 5-hour drive from my home.

Mostly, I’ve been my own boss. I toured and recorded with a post-punk band and worked on a poetry fellowship before starting my first company in 1992. The shock of state government bureaucracy was profound. I decided to seek inspiration in the Sun Dance ceremony of the High Plains. There, I learned four profound lessons from my Lakota teachers.

Related: Lessons in Greatness: One Woman's Journey From Heart Condition to Climbing Mt. Everest

1. Surrender. The medicine man had travelled to Ojai, Calif., from the Pine Ridge Indian Reservation to perform a yuwipi ceremony in which the medicine man is wrapped in blankets, bound tightly with rope and placed in the center of a dark room. I was invited to tag along.

After a few words from the host, singers called in the spirits with song. The medicine man talked to the spirits and interpreted their messages. Toward the end of the ceremony, as the medicine man and singers sent the spirits home, stars twinkled in the dark room.

When the lights came on, the medicine man was sitting cross-legged with the blankets and ropes folded neatly in front of him, having been released by the spirits.

A company is very much like the yuwipi ceremony, with the CEO wrapped and bound at the center of the circle. The forces of the market, demands of customers, needs of employees, direction of the board and pressure from investors make control an illusion.

Last year, our major investor initiated a cost-cutting plan and announced they would not participate in any future financings of Geostellar, my solar energy marketplace. With a $27 million dollar valuation coming off of our previous round, a burn-rate of a half-million dollars a month and dwindling resources, the withdrawal of our major investor felt catastrophic.

Our major investor, as the majority holder of preferred shares, reset all preferred shares to common stock and issued new shares to cover the previous two-week payroll. That restructuring allowed us to raise new money through equity crowdfunding while incentivizing the employees to keep working through an uncertain period.

When the lights came on, we had a new board of directors, I had a controlling interest in the company and we had the working capital to continue executing on our plan. After being tied-up and covered in blankets for months, I was sitting cross-legged at the center of the circle, unbound.

2. Humility. The Hamblechya, or Vision Quest, of the High Plains tribes is powerful and transformative. The initiate is left in the wilderness for four days without food and water to receive a guiding vision for life’s path. I recognized I needed that to regain my entrepreneurial mojo.

The medicine man said, first, I needed to attend a Sweat Lodge ceremony. In the Sweat Lodge ceremony, you form a deep connection with all of your relations. It is critical that you abandon your hierarchical mindset, which considers humans to be of a higher order than other beings. It is important to dislodge the ego and become centered in the broader world of nature. Only in this deep humility that wisdom can be received.

I find the same to be true in organizations. When we try to partner with companies that have strict hierarchies, rigid structures and little respect for the individual, it is more difficult to achieve productive business outcomes.

How many organizations consider humility to be a core value? There is a very different energy in a meeting with individuals who sit in a conference room as if it’s a ceremony, with a deep mind-set of service, humility and respect for the value that each individual brings.

Related: Overcoming Rejection: A Personal Journey

3. Commitment. I had a vivid dream the night before the Vision Quest. There was a dead deer in the road. At its head stood a woodpecker. I knew I had to help the deer pass. I approached the deer and reached into a pouch that hung around my neck to sprinkle tobacco over the corpse. The woodpecker vanished. When I pulled the tobacco from the pouch, I found that it was longer tobacco. It was woodpecker feathers. I spread the feathers over the deer.

The next afternoon, as I was preparing to go up on the hill to begin my quest, a woodpecker hopped up and down on a tree beside the lodge chirping and squawking.

Related: How do I recover financially and emotionally from a business failure?

In the Sweat Lodge, I was covered in a blanket, put in the back of a pickup truck and driven up into the hills where I was to stay on a buffalo robe until the medicine man came to take me down. I stood, danced, sang and prayed to the four directions. Animals of all sorts came and visited.

“Tankashila!” I said, using the Lakota term for Grandfather, which denotes all of nature, spirit and the universe. “Unci Makha!” I called to Mother Earth. “I believe you are present and aware, but I want proof. I want you to show me that the universe is conscious, that visions are real and magic is possible. If you do, I’ll participate in the Sun Dance and follow this path for the next four years.”

Clouds formed vivid shapes the afternoon of the second day. A man, an eagle and a bear airbrushed across the sky. I could feel the messages in my heart. Then, the truck pulled up and the medicine man got out.

“Tankashila says it’s time to come down now.” A cloud in the shape of a man waved to me, so I accepted water from the medicine man, covered myself with the blanket and climbed into the truck.

Back inside the Sweat Lodge, I recounted my experiences, which the medicine man interpreted for me. He told me that they took me down from the hill when a deer came out of the woods and walked around the fire pit, signaling it was time. The medicine man said I should go inside the house and call my wife, that she’d been worried about me.

When I went in the house, a woodpecker was struggling against the window, trying to get out. It hopped into my hands and I set it free. The medicine was real.

Tankashila and Unci Makha had worked their magic. They had shown me beyond a reasonable doubt that the dreamworld, the unconscious mind, the spirit world, nature and the universe were all the same. It was real. Now, I had to keep my commitment.

I have learned that simply making a commitment is magic. When you found a company, when you enter into a business deal, when you hire an employee, when you book a conference call, you are making a sacred commitment. Not only to show up, but to be fully present and work through the reality of the commitment without any attachment to outcomes.

4. Trust.I had committed to Sun Dancing for four years. Each Sun Dance is four days without food or water in the hot July sun of the High Plains. Dressed in long skirts, sage crowns and bracelets, blowing eagle bone whistles with a eagle wing fan in our hands, we danced around a tree while holding pouches of tobacco. Powerful drums kept our bare feet in rhythm and soaring voices filled our hearts with song.

Early afternoon on the third day, two of the Sun Dance leaders came to where I was dancing. They pierced my chest in two places with sharpened buffalo bone, tying the ends of the bone to rope that was attached to branches of the tree. They helped me to my feet.

I walked away from the tree to the length of the rope so that my skin pulled taught. I leaned back against the rope, feeling the intense pain throughout my torso, just enough pressure, but not enough to tear my skin. I blew the eagle bone whistle, then approached the tree and let the rope go slack. I put my forehead to the trunk and blew the whistle, then walked back away from the tree.

Four times I repeated this dance, pulling back on the rope, then again approaching the tree. On the fourth round, when I reached the end of the rope, I kept walking. My skin pulled tighter and tighter, the pain grew more and more intense until my flesh broke and the rope and buffalo bones flew up toward the tree.

I had never felt such freedom and joy.

Since I’ve experienced the indigenous ceremonies of the High Plains, the experience of business, of entrepreneurship, is vastly different for me. I have a deeper trust in the team, in our partners, in the market and the world as a whole. Nothing can be forced.

It takes time to make prayer ties, to carve buffalo bone, to fast and to dance. It takes trust to build great software, to bring products to market and to build a company.

The purpose is not the outcome, but the dance of the company itself.

Related: Why an Accountability Buddy Is Your Secret Weapon for Faster Growth