You'll need some programming knowledge.
I got some stuff written about that:
Introduction to Half-Life programmingBetter view bobbing - basics of view swaying.
TL;DR
If you go the 1st route (the one that Bruce said), you'd need Visual Studio 2017 Community Edition, and preferably a HL SDK fork that works with VS 2017, like Solokiller's fork. (I mean, it doesn't really matter. You can use Visual Studio 6.0 from 1998, and HL SDK 2.3, but I'm saying VS2017 and a modified fork just because it's nicer to work in a modern environment)
Then you'll have to go to view.cpp on the clientside project, and do your maths there.
You'll get this sort of end result:
If you want to achieve the Black Mesa style "weapon lag", like in the GIF, then you'll need to interpolate the angles, or alternatively, log a series of positions and use the last logged position, and that again, needs a bit of maths.
If you go the 2nd route, well, there isn't much to say there. Find a programmer to do it for you, or pay them (or don't, if they work for free).