The first one helped me understand how the mind influences the emotions, haven't read the second.
There is also a handy CBT app called Quirk that I'd also recommend checking out https://www.quirk.fyi/
I'd recommend seeing a therapist and developing a treatment plan together. It's a practical way to identify what you are worrying about, why and how to overcome it. Then, I'd encourage you to learn more about personalities and your personality type. There are a bunch of 'personality type' systems out there, but the Enneagram is one of the least specific in its 'typing' and most useful in its insights.
- The Complete Enneagram: 27 Paths to Greater Self-Knowledge (https://www.amazon.com/Complete-Enneagram-Paths-Greater-Self...)
- Feeling Good (https://www.amazon.com/Feeling-Good-New-Mood-Therapy/dp/0380...)
Feeling Good is by David Burns, a Stanford professor who developed Cognitive Behavior Therapy. CBT is a way to identify and manage your thoughts. It sounds like you are a 'fortune telling' type of person and you try to read your crystal ball and then act on those assumptions rather than what you know. Burns goes into how to identify those types of thoughts, how to refute them and how to mitigate their effects.
I'm going through a stage in my life when I don't enjoy doing things anymore. Obviously, if a task is considered somewhat hard and I know I will barely enjoy it, there is very little internal emotional support (motivation?) for doing it, thus procrastination.
I did an exercise from the book which was to list tasks I did during the day and mark a satisfaction rate as well as an efficiency rate. All the tasks are like 10% satisfaction, 99% efficiency. Seems like a mismatch. Then I asked myself a question "What would a person who does useful and efficient things tell himself to feel that miserable? What would he think about?".
I got the following, which goes really deep into my internal motivations and fears:
"All these tasks are worth nothing. I shouldn't be happy with them because I can forget that I don't grow and don't accomplish much in general. I may end up being a silly guy who only chills and has fun but in fact, has nothing meaningful going in his life. I shouldn't forget that things are not that good at the moment and it's too early to relax, to enjoy small accomplishments. A person becomes weak if he always enjoys what's going on around."
So if you experience a huge mismatch between satisfaction and efficiency (paradoxically I naturally have lots of fun doing things I am like 0% efficient in because I don't know yet how perfect result looks like), I suggest you to ask the same question "what thoughts could make a person that miserable?".
After listing advantages of believing the above and deep appreciation of my beliefs, it became clear that some of them are crazy self-sadistic. Even though they have the best intentions in the universe (making my life better) what they in fact achieved was getting me to the verge of having suicidal thoughts. And now I am doing exercises mentioned in the book and the podcast to give up these beliefs.
 - https://www.amazon.co.uk/Feeling-Good-New-Mood-Therapy/dp/03...
 - https://feelinggood.com/2017/09/18/053-ask-david-i-dont-feel...
 - https://itunes.apple.com/us/podcast/feeling-good-podcast-tea...
I wouldn't classify 12 Rules of life as a typical 'self-help' book because Peterson is not a self-proclaimed self-help guru without any substance.
If you check his career section on Wikipedia you'll find out that "Peterson's areas of study and research are in the fields of psychopharmacology, abnormal, neuro, clinical, personality, social, industrial and organizational, religious, ideological, political, and creativity psychology.
Peterson has authored or co-authored more than a hundred academic papers. Peterson has over 20 years of clinical practice, seeing 20 people a week, but in 2017, he decided to put the practice on hold because of new projects."
And he doesn't try to sell you the idea that life is beautiful and amazing, he actually agrees that life is tragic and brutal.
> I always have a feeling that you just cannot sum up all the things to be "happy" or "content" or whatever in one book
I agree to that. You cannot sum up all the things which make you happy or more content, but you can follow principles which increase the probability of success in what you want to do, such as "be a bit better tomorrow in some minor way"
> I am interested to know, how often when you face a situation, you stop and think, oh I read this and that in a book, I should act this way instead of my natural intuition to do the other way.
Not every time, but more often than before reading that book. For example, I've read Feeling Good: The new mood therapy(another great book with a self-helpish title) and after reading that book I really started to put in practice some exercises in that book which by now they became almost automatic. For so much time I was a victim of cognitive distortions and now I finally found a way to beat them. And not only me. 
Here's  a kind of silly example of it in action over on the Overwatch subreddit.
As for what how my doctor and I have "hacked" anxiety, and the last one is most certainly a hack done in desperation:
A long time ago ('80s) I learned Cognitive Therapy, which is now Cognitive Behavioral Therapy (CBT) with some additional stuff added to cognitive psychology (in simplest terms, you feel bad because you tell yourself bad things, view the world through dark glasses, etc., cognitive distortions of reality). I cannot speak highly enough of this; for example, many many years later I realized that thoroughly applying it to myself pretty much ended the usefulness of talking therapy. Start with this book and see what it and you can do: http://www.amazon.com/Feeling-Good-New-Mood-Therapy/dp/03808... (so good I keep an extra copy or two handy to give to people).
A laser specific SSRI, trade name Lexapro, generic escitalopram. Probably helps, not entirely sure; mixed with this is what my doctors and I suspect is depression of a bipolar nature (not like normal depression, but I only go manic if prescribed the wrong drug, like Paxil; this has been troublesome for a very long time, but not disabling by iself).
Critically, given what could otherwise be life threatening insomnia etc., a low dose of an "atypical" antipsychotic that has a useful sedating side effect (an antihistamine, so also good for your allergies :-), trade name Seroquel, generic quetiapine fumarate.
One thing to emphasize from our disparate experiences is that in this arena there aren't "one size fits all" solutions. There are common symptoms which respond to common solutions, sometimes after a search for a particular drug that works with acceptable side effects, then there are people like me where doctors and myself struggle for years to find a set of drugs that provide the best solution (for now) that control but by no means cure my symptoms (like my uncle, this eventually disabled me).
Getting back to the original basis of this discussion, I'm absolutely sure that Amblify when used as an adjunct for current generation antidepressants works from some people with refractory depression, which I can attest is no fun at all, since mine is only partially alleviated, and I have friends who spent years before they found at minimum partial solutions for their more standard unipolar depression. Is it seriously over-prescribed? Who knows? In my experience, there are enough people out there with refractory depression that it might well not be. And I'd certainly try it before e.g. electroshock therapy, which is one of the alternatives if you're desperate enough.
As a side note, I learned cognitive psychology in the '80s (now cognitive behavioral psychology, http://www.amazon.com/Feeling-Good-New-Mood-Therapy/dp/03808... is the classic and highly recommended layman's introduction), and it's tremendously useful, and in retrospect ended any benefits from talking therapy, but it's pretty clear that like the 3 particular antidepressants I've tried from two generations of them, only a partial solution for me.
And on top of that you isolate yourself. I know how hard it was to ask for help therefore I want to show you some things which helped me:
- Realize that your depression is lying to you. It doesn't tell the truth. It makes you believe that something is logical even if it isn't.
- Read 'Feeling Good' - terrible title, great book. It will probably work better than average on the average HN reader because it takes a 'rational' approach to depression (cognitive-behavioral therapy). It helps you to recognize destructive thought patterns and how to deal with them.
- Garbage in, garbage out. What works for computers also works for your body. Yeah, you're a geek but you can eat some vegs instead of the 500th pizza. Also working out (or other sports) are pretty great.
- Long term: Therapy which tries to work on the root cause and not just at symptoms.
Finally, here's a rather extensive list with lectures, books, exercises, etc. which help dealing with depression . Back when I was fed up with feeling crap I created a spreadsheet with the 8 activities and tracked those every day.
Note: Every person seem to react to differently. I read about people who improved a lot by meditating - on the other hand, it didn't work for me.
So, try some things out and don't give up. You can beat that liar in your head.
PS: If you have any questions feel free to ask - if you want to send me a private one write at <username> @ panictank.net
I read and used the early '80s edition, before the "behavioral" was added to it, and around a decade or so ago realized that learning and following it made further talking therapy essentially useless.
The theory behind the "cognitive" part of it, simply put, is that thinking bad, not to mention incorrect, thoughts about yourself makes you feel bad. Adjusting your mental filters and the like to reality can then make a very big difference.
(Not, in my case, a complete cure, I've got an inherited refractory depression that my doctors and I supposize is bipolar in nature, I just never go manic nor cycle all that much. Adding a SSRI to the mix significantly improves it.)
I've been there a couple of times, I've even had a suicide attempt at 17 and ended up spending 2 months in the hospital with kidney failure. But each time depression crept it on me again, I was better and better equipped to deal with it.
The last time I was depressed towards suicidal (about 2 years ago), two things helped me:
This book: http://www.amazon.com/Feeling-Good-The-Mood-Therapy/dp/03808...
And a low-dose hit of LSD, which practically sucked me out of depression in one night (for the reasons outlined below).
This was my way, you might need to take a different path, but speaking from experience, it is possible to get yourself out of this and then good things start to happen.
It will get better, just hold on.
The reason you're feeling like nothing works, is because you've forgotten what you've came here for. What this life is about. It's not about how well you write code, it's not about how many friends you have or how much money you make or what car/phone you have.
What is it about then ?
That's for you to find out. That's how the hit of LSD or psilocybin (mushrooms) might help, but you need to know what and how you're doing it.
The other reason is the way you interpret reality and what you say to yourself every day. Details about this are in the book.
And some other ideas:
Stop everything, take a vacation and go on a trip. It's summer, go to a festival in the mountains or south to the sea, visit Paris or Barcelona or go to India.
Do something you've always wanted to, but never had the time or resources to accomplish.
The #1 thing you can do to at least not help drive yourself deeper into depression is to learn cognitive therapy, which nowadays has a "behavioral" aspect added to it that I'm not familiar with (this is the CBT Michael refers to in his message composed at the same time as mine). Buy this book; I keep extra copies to give to people: http://www.amazon.com/Feeling-Good-The-Mood-Therapy/dp/03808...
If you're truly bipolar, there's no substitute for a doctor's care as well, you'll probably need a mood stabilizer, of which there are many varieties from the "gold standard" of lithium to modern atypical anti-psychotics.
The book "Feeling Good" by Dr. David Burns might help you with your depression.
I can only directly recommend the '80s version, before the "Behavioral" bit was added, but I found it to be very very powerful. In 20/20 hindsight, so good that talk therapy afterwords hasn't been useful (there's no doubt a bit of Psychologist Roulette as grivo puts it involved, maybe there's a better therapist out there that I haven't found, but...).
Depression, for example, in my experience, and from what I've seen -- often has a cause; a rational, explainable cause (that the sufferer often isn't aware of). When you treat someone's depression as a "medical disease" like the cold or the flu, you are completely ignoring the human factor.
Many cases of depression can actually be solved without drugs -- by addressing the problem at the root of it. "Feeling Good: The New Mood Therapy" by David D. Burns, goes into this. (http://www.amazon.com/Feeling-Good-New-Mood-Therapy/dp/03808...)
I don't know why people ignore the real human factor when it comes to depression. Instead they resort to a bunch of drugs that do not address the root (psychological) cause of the depression, but rather just give some temporary fleeting relief.
Guys, if you're suffering from depression or anxiety, this is the be all and end all of lasting treatments that works. I actually Ctrl-F'ed for it when I opened this thread.
Meanwhile, try reading this: http://www.amazon.com/Feeling-Good-The-Mood-Therapy/dp/03808... I haven't really read it but I've been exposed to the CBT methodology that it's based on (see my other comments on this thread) and it works.
Get help soon, and good luck! :)
Feeling Good, The New Mood Therapy by David D. Burns, M.D. (http://www.amazon.com/Feeling-Good-Therapy-Revised-Updated/d...)
This is the best popular treatment of cognitive therapy (nowadays cognitive behavioral therapy, I haven't read this newer edition). Anyone who's depressed really needs to try this out, with or without the aid of anti-depressants.
The thesis is that you, at least in part, make yourself depressed by telling yourself depressing things that are largely false, about yourself, about what others are saying and doing to/about to you, etc.; in general, incorrect filtering of what you perceive.
So you identify those things and do you best to correct your mis-perceptions. Since I read an earlier edition in the '80s, behavioral therapy has been added to the mix, and that's supposed to help (I can't vouch for it either way).
Anyway, after I read this (and a few other cognitive psychology works) talking therapy became absolutely useless ... I'd "fixed" myself as much as possible in this way.
(Knowledge of this is also really useful to understanding the end of the Evangelion anime TV series (seriously, the creator was coming out of a multi-year bad period, "living by not dying").)
Just $8. It works.
The other thing is positive thinking. I don't mean "happy" thinking; I mean positive in the sense of foreground vs. background. Foreground is something that can help you get where you want to go; background is something you don't have that would have helped you. When building something, you attach things to what you've already got - not try to attach things to space! Trees grow this way; crystals do too. And lots of people talk about building or growing software.
There's a framing issue too: I find it really helpful to compare what I have now compared with what I had before (to highlight the fact that I've had some impact). This is to counteract the frame of comparing what I've done with something that was better, was perfect.
Funny thing is, when I approach things in this "positive" way, I feel a lot more encouraged and inspired. Exciting ideas come to me from nowhere, and I have lots of energy. So, even though it seems like a fun, easy way, it results in much higher productivity. For me, anyway.
PS: there's a school of thought that depression is caused by formal reasoning errors ("cognitive distortions"). As a form of mind-hacking. I find it extremely fascinating: http://www.amazon.com/Feeling-Good-Therapy-Revised-Updated/d...
Fresh book recommendations delivered straight to your inbox every Thursday.