Observe and think when you say "Thank you for A, it really helped me because B", where A and B should be detailed.
Frequently people don't have a clear picture of how what they did is important to the business, how helpful the thing they did for you is, etc. So make sure they get that.
Another thing is to give small gifts. I live on a farm where a friend has quite a few beehives. We have honey coming out of our ears (some of the best tasting honey there is) and we give jars away all the time.
Ask if you can have a private meeting with the person or people in question, have no other agenda to it and just say directly to them what you have written down above. Structure like this.
1. Context Describe what was going on, how you were feeling, that you were having a rough time
2. Attribute Describe what they did for during this time
3. Explain Connect what they did with how it made you feel and how that helped you get out of the rough patch
4. Thank them Say that you are grateful for their support and that you wanted them to know that.
Good luck!
A sincere 'Thanks' in the presence of their peers also works.
You can do this with all work colleagues who have played a significant part in an initiative that you are leading/responsible for, including those outside of your department.
How to express and receive gratitude with NVC: https://www.youtube.com/watch?v=Smyc5vF6q-M
Marshall talks about jackals and giraffes. In a nutshell, jackal language is what we all use everyday. Giraffe language is the language he is proposing we use to enable human connection.
The full talk on NVC is here: https://www.youtube.com/watch?v=l7TONauJGfc
I usually will send a quick message or reply to an email from the person, praising something cool they did, or something that impressed me etc. Sometimes it's tiny, like "hey, I approved your Code Review request, I really like how elegant your solution is".
Then if I come across their manager I will comment on that person positively. Again it might be short, like " I am bringing this up because I have seen a praise anti-pattern, where it's done so frequently, or for anything that someone does even if it's super minor, and it feels like brown-nosing. The other anti-pattern, if you are a manager, is sending praise to everyone in the team, which again devalues the action. Again, this is my personal opinion. Edit: I almost forgot. Praise aside, a good way to show Gratitude is caring. If you know they have a hobby, if you come across something that relates you can ping them about it. It might seem small, but everyone like knowing that others think/care about them. An alternate way is carving time out of your day to help them. Again, in my case pretty much about 700 people know me by name, so when they see that I am spending a time on one of their problems it means something. I feel like I am coming across as narcistic in this reply, but I am just trying to analyze my behavior objectively, all of this is done subconsciously.